You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
3.2KB

  1. import 'package:farm_tpf/presentation/custom_widgets/button/button_2_icon.dart';
  2. import 'package:farm_tpf/presentation/custom_widgets/button/second_button.dart';
  3. import 'package:farm_tpf/presentation/screens/codes/code_detail_page.dart';
  4. import 'package:farm_tpf/presentation/screens/codes/widgets/item_code.dart';
  5. import 'package:farm_tpf/themes/app_colors.dart';
  6. import 'package:flutter/cupertino.dart';
  7. import 'package:flutter/material.dart';
  8. import 'package:get/get.dart';
  9. import '../../../themes/styles_text.dart';
  10. import '../plot/widget_search.dart';
  11. class CodePage extends StatefulWidget {
  12. const CodePage({super.key});
  13. @override
  14. State<CodePage> createState() => _CodePageState();
  15. }
  16. class _CodePageState extends State<CodePage> {
  17. final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();
  18. @override
  19. Widget build(BuildContext context) {
  20. return Scaffold(
  21. backgroundColor: Colors.white,
  22. key: _scaffoldKey,
  23. body: SafeArea(
  24. child: Column(
  25. crossAxisAlignment: CrossAxisAlignment.start,
  26. children: <Widget>[
  27. SizedBox(
  28. height: 8,
  29. ),
  30. Container(
  31. padding: EdgeInsets.all(8),
  32. color: Colors.white,
  33. child: Text(
  34. 'Danh sách tem',
  35. style: TextStyle(fontWeight: FontWeight.w500, fontSize: 22),
  36. ),
  37. ),
  38. WidgetSearch(),
  39. Row(
  40. children: [
  41. Button2Icon(
  42. leftIcon: CupertinoIcons.arrow_up_arrow_down,
  43. rightIcon: CupertinoIcons.chevron_down,
  44. title: 'Sort',
  45. onPressed: () {},
  46. ),
  47. Button2Icon(
  48. leftIcon: CupertinoIcons.slider_horizontal_3,
  49. title: 'Filter',
  50. rightWidget: Container(
  51. width: 16,
  52. height: 16,
  53. decoration: BoxDecoration(
  54. borderRadius: BorderRadius.circular(12),
  55. color: Colors.blue,
  56. ),
  57. child: Center(
  58. child: Text(
  59. '1',
  60. style: StylesText.caption6.copyWith(color: Colors.white),
  61. ),
  62. ),
  63. ),
  64. onPressed: () {},
  65. ),
  66. const Spacer(),
  67. SecondButton(
  68. onPressed: () {},
  69. title: 'Tạo tem',
  70. leftIcon: CupertinoIcons.add,
  71. color: AppColors.primary1,
  72. textColor: Colors.white,
  73. borderColor: AppColors.primary1,
  74. ),
  75. ],
  76. ),
  77. Expanded(
  78. child: ListView.builder(
  79. itemBuilder: ((context, index) {
  80. return ItemCode(
  81. onPressed: () {
  82. Get.to(() => CodeDetailPage());
  83. },
  84. );
  85. }),
  86. itemCount: 100,
  87. ),
  88. ),
  89. ],
  90. ),
  91. ),
  92. );
  93. }
  94. }