update invoice
This commit is contained in:
66
lib/pages/rates/custom_row.dart
Normal file
66
lib/pages/rates/custom_row.dart
Normal file
@@ -0,0 +1,66 @@
|
||||
import 'package:fcs/domain/entities/custom.dart';
|
||||
import 'package:fcs/domain/vo/delivery_address.dart';
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/pages/widgets/local_text.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_icons/flutter_icons.dart';
|
||||
|
||||
typedef SelectionCallback(Custom custom);
|
||||
|
||||
class CustomRow extends StatelessWidget {
|
||||
final Custom custom;
|
||||
final SelectionCallback selectionCallback;
|
||||
const CustomRow(
|
||||
{Key key, this.custom, this.selectionCallback})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: selectionCallback == null
|
||||
? null
|
||||
: () => this.selectionCallback(custom),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
line(context, custom.productType,
|
||||
iconData: MaterialCommunityIcons.account,
|
||||
color: primaryColor,
|
||||
fontSize: 16),
|
||||
line(context, custom.fee.toString(),
|
||||
iconData: Icons.phone, color: primaryColor, fontSize: 16),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget line(BuildContext context, String text,
|
||||
{IconData iconData, Color color, double fontSize}) {
|
||||
return Row(
|
||||
children: [
|
||||
iconData == null
|
||||
? SizedBox(width: 40)
|
||||
: Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, right: 8),
|
||||
child: Icon(iconData, color: Colors.black38),
|
||||
),
|
||||
Flexible(
|
||||
child: TextLocalStyle(
|
||||
context,
|
||||
text ?? "",
|
||||
fontSize: fontSize ?? 14,
|
||||
color: color,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user