update
This commit is contained in:
@@ -4,14 +4,13 @@ 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(CustomDuty custom);
|
||||
|
||||
class CustomRow extends StatelessWidget {
|
||||
final CustomDuty custom;
|
||||
final SelectionCallback selectionCallback;
|
||||
const CustomRow({Key key, this.custom, this.selectionCallback})
|
||||
final SelectionCallback? selectionCallback;
|
||||
const CustomRow({Key? key, required this.custom, this.selectionCallback})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
@@ -19,7 +18,7 @@ class CustomRow extends StatelessWidget {
|
||||
return InkWell(
|
||||
onTap: selectionCallback == null
|
||||
? null
|
||||
: () => this.selectionCallback(custom),
|
||||
: () => this.selectionCallback!(custom),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
@@ -40,8 +39,8 @@ class CustomRow 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
|
||||
@@ -55,7 +54,7 @@ class CustomRow extends StatelessWidget {
|
||||
context,
|
||||
text ?? "",
|
||||
fontSize: fontSize ?? 14,
|
||||
color: color,
|
||||
color: color ?? Colors.grey,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user