add shipments
This commit is contained in:
52
lib/pages/widgets/title_with_add_button.dart
Normal file
52
lib/pages/widgets/title_with_add_button.dart
Normal file
@@ -0,0 +1,52 @@
|
||||
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 'callbacks.dart';
|
||||
|
||||
class TitleWithAddButton extends StatelessWidget {
|
||||
final IconData iconData;
|
||||
final String titleKey;
|
||||
final OnTap onTap;
|
||||
|
||||
const TitleWithAddButton({Key key, this.iconData, this.titleKey, this.onTap})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 15.0),
|
||||
child: Icon(
|
||||
this.iconData,
|
||||
color: primaryColor,
|
||||
),
|
||||
),
|
||||
LocalText(
|
||||
context,
|
||||
titleKey,
|
||||
color: Colors.black54,
|
||||
fontSize: 20,
|
||||
)
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
onTap == null
|
||||
? Container()
|
||||
: Padding(
|
||||
padding: const EdgeInsets.only(right: 25.0),
|
||||
child: IconButton(
|
||||
onPressed: () => onTap(),
|
||||
icon: Icon(
|
||||
Icons.add_circle,
|
||||
color: primaryColor,
|
||||
)),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user