update
This commit is contained in:
@@ -3,15 +3,14 @@ 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(DeliveryAddress deliveryAddress);
|
||||
|
||||
class DeliveryAddressRow extends StatelessWidget {
|
||||
final DeliveryAddress deliveryAddress;
|
||||
final SelectionCallback selectionCallback;
|
||||
final SelectionCallback? selectionCallback;
|
||||
const DeliveryAddressRow(
|
||||
{Key key, this.deliveryAddress, this.selectionCallback})
|
||||
{Key? key, required this.deliveryAddress, this.selectionCallback})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
@@ -19,7 +18,7 @@ class DeliveryAddressRow extends StatelessWidget {
|
||||
return InkWell(
|
||||
onTap: selectionCallback == null
|
||||
? null
|
||||
: () => this.selectionCallback(deliveryAddress),
|
||||
: () => this.selectionCallback!(deliveryAddress),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
@@ -54,8 +53,8 @@ class DeliveryAddressRow extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget line(BuildContext context, String text,
|
||||
{IconData iconData, Color color, double fontSize}) {
|
||||
Widget line(BuildContext context, String? text,
|
||||
{IconData? iconData, Color? color, double? fontSize}) {
|
||||
return Row(
|
||||
children: [
|
||||
iconData == null
|
||||
@@ -69,7 +68,7 @@ class DeliveryAddressRow extends StatelessWidget {
|
||||
context,
|
||||
text ?? "",
|
||||
fontSize: fontSize ?? 14,
|
||||
color: color,
|
||||
color: color ?? Colors.grey,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user