|
- import 'package:farm_tpf/presentation/custom_widgets/button/button_2_icon.dart';
- import 'package:farm_tpf/presentation/custom_widgets/button/second_button.dart';
- import 'package:farm_tpf/presentation/screens/codes/code_detail_page.dart';
- import 'package:farm_tpf/presentation/screens/codes/widgets/item_code.dart';
- import 'package:farm_tpf/themes/app_colors.dart';
- import 'package:flutter/cupertino.dart';
- import 'package:flutter/material.dart';
- import 'package:get/get.dart';
-
- import '../../../themes/styles_text.dart';
- import '../plot/widget_search.dart';
-
- class CodePage extends StatefulWidget {
- const CodePage({super.key});
-
- @override
- State<CodePage> createState() => _CodePageState();
- }
-
- class _CodePageState extends State<CodePage> {
- final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- backgroundColor: Colors.white,
- key: _scaffoldKey,
- body: SafeArea(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- SizedBox(
- height: 8,
- ),
- Container(
- padding: EdgeInsets.all(8),
- color: Colors.white,
- child: Text(
- 'Danh sách tem',
- style: TextStyle(fontWeight: FontWeight.w500, fontSize: 22),
- ),
- ),
- WidgetSearch(),
- Row(
- children: [
- Button2Icon(
- leftIcon: CupertinoIcons.arrow_up_arrow_down,
- rightIcon: CupertinoIcons.chevron_down,
- title: 'Sort',
- onPressed: () {},
- ),
- Button2Icon(
- leftIcon: CupertinoIcons.slider_horizontal_3,
- title: 'Filter',
- rightWidget: Container(
- width: 16,
- height: 16,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(12),
- color: Colors.blue,
- ),
- child: Center(
- child: Text(
- '1',
- style: StylesText.caption6.copyWith(color: Colors.white),
- ),
- ),
- ),
- onPressed: () {},
- ),
- const Spacer(),
- SecondButton(
- onPressed: () {},
- title: 'Tạo tem',
- leftIcon: CupertinoIcons.add,
- color: AppColors.primary1,
- textColor: Colors.white,
- borderColor: AppColors.primary1,
- ),
- ],
- ),
- Expanded(
- child: ListView.builder(
- itemBuilder: ((context, index) {
- return ItemCode(
- onPressed: () {
- Get.to(() => CodeDetailPage());
- },
- );
- }),
- itemCount: 100,
- ),
- ),
- ],
- ),
- ),
- );
- }
- }
|