Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. class MyOrder extends StatefulWidget {
  2. @override
  3. _MyOrderState createState() => _MyOrderState();
  4. }
  5.  
  6. class _MyOrderState extends State<MyOrder> with SingleTickerProviderStateMixin{
  7. var strTitle = Translations.globalTranslations.myOrders;
  8. TabController _tabController;
  9.  
  10. @override
  11. void initState() {
  12. _tabController = new TabController(length: 2, vsync: this);
  13. super.initState();
  14. }
  15.  
  16. @override
  17. Widget build(BuildContext context) {
  18.  
  19. return new Scaffold(
  20. appBar: new AppBar(
  21. elevation: 1.0,
  22. leading: new IconButton(
  23. icon: Image.asset('images/keyboard_backspace.png', width: 24.0, height: 24.0,),
  24. onPressed: () => Navigator.of(context).pop(),
  25. ),
  26. title: Text(strTitle,textAlign: TextAlign.left , style: UIUtills().getTextStyle(
  27. fontName: AppFontName.appFontSemiBold,
  28. fontsize: 20,
  29. color: AppColor.redColor),),
  30. backgroundColor: Colors.white,
  31. iconTheme: IconThemeData(
  32. color: AppColor.redColor),
  33. bottom: TabBar(
  34. indicatorColor: AppColor.redColor,
  35. labelColor: AppColor.blackColor,
  36. labelStyle: UIUtills().getTextStyle(
  37. fontName: AppFontName.appFontSemiBold,
  38. fontsize: 16,
  39. color: AppColor.blackColor),
  40. tabs: [
  41. new Tab(text:Translations.globalTranslations.pastOrder),
  42. new Tab(text: Translations.globalTranslations.upComing)
  43. ],
  44. controller: _tabController,
  45. indicatorSize: TabBarIndicatorSize.tab),
  46. ),
  47. body: TabBarView(
  48. children: [
  49. PastOrder(),
  50. UpComingOrder(),
  51. ],
  52. controller: _tabController,),
  53. );
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement