add rate service
This commit is contained in:
@@ -7,6 +7,7 @@ import 'package:fcs/pages/faq/faq_edit_page.dart';
|
||||
import 'package:fcs/pages/main/model/language_model.dart';
|
||||
import 'package:fcs/pages/main/model/main_model.dart';
|
||||
import 'package:fcs/pages/payment_methods/payment_method_page.dart';
|
||||
import 'package:fcs/pages/rates/shipment_rates.dart';
|
||||
import 'package:fcs/pages/widgets/bottom_up_page_route.dart';
|
||||
import 'package:fcs/pages/widgets/fcs_expansion_tile.dart';
|
||||
import 'package:fcs/pages/widgets/local_text.dart';
|
||||
@@ -43,6 +44,32 @@ class _FAQListPageState extends State<FAQListPage>
|
||||
bool isEditable = context.select((MainModel m) => m.faqEditable());
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: LocalText(
|
||||
context,
|
||||
"faq.title",
|
||||
color: Colors.white,
|
||||
fontSize: 20,
|
||||
),
|
||||
leading: new IconButton(
|
||||
icon: new Icon(CupertinoIcons.back),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
backgroundColor: primaryColor,
|
||||
actions: isEditable
|
||||
? [
|
||||
IconButton(
|
||||
onPressed: () => setState(() {
|
||||
isEditMode = !isEditMode;
|
||||
}),
|
||||
icon: Icon(
|
||||
Icons.edit,
|
||||
color: Colors.white,
|
||||
))
|
||||
]
|
||||
: [],
|
||||
),
|
||||
floatingActionButton: isEditable
|
||||
? FloatingActionButton.extended(
|
||||
onPressed: () {
|
||||
@@ -54,54 +81,11 @@ class _FAQListPageState extends State<FAQListPage>
|
||||
backgroundColor: primaryColor,
|
||||
)
|
||||
: Container(),
|
||||
body: CustomScrollView(
|
||||
slivers: [
|
||||
SliverAppBar(
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
CupertinoIcons.back,
|
||||
size: 30,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
backgroundColor: primaryColor,
|
||||
expandedHeight: 150.0,
|
||||
floating: false,
|
||||
pinned: true,
|
||||
flexibleSpace: FlexibleSpaceBar(
|
||||
centerTitle: true,
|
||||
titlePadding:
|
||||
EdgeInsets.symmetric(vertical: 10, horizontal: 45),
|
||||
title: LocalText(
|
||||
context,
|
||||
"faq.title",
|
||||
fontSize: 20,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
actions: isEditable
|
||||
? [
|
||||
IconButton(
|
||||
onPressed: () => setState(() {
|
||||
isEditMode = !isEditMode;
|
||||
}),
|
||||
icon: Icon(
|
||||
Icons.edit,
|
||||
color: Colors.white,
|
||||
))
|
||||
]
|
||||
: [],
|
||||
),
|
||||
SliverList(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(context, index) {
|
||||
return _faqItem(context, faqModel.faqs[index]);
|
||||
},
|
||||
childCount: faqModel.faqs.length,
|
||||
),
|
||||
)
|
||||
],
|
||||
));
|
||||
body: ListView.builder(
|
||||
itemCount: faqModel.faqs.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return _faqItem(context, faqModel.faqs[index]);
|
||||
}));
|
||||
}
|
||||
|
||||
bool isEditMode = false;
|
||||
@@ -177,6 +161,9 @@ class _FAQListPageState extends State<FAQListPage>
|
||||
} else if (linkPage == page_buying_instructions) {
|
||||
Navigator.of(context)
|
||||
.push(CupertinoPageRoute(builder: (context) => BuyingOnlinePage()));
|
||||
} else if (linkPage == page_rates) {
|
||||
Navigator.of(context)
|
||||
.push(CupertinoPageRoute(builder: (context) => ShipmentRates()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user