mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-11 13:58:55 +03:30
124 lines
3.4 KiB
Dart
Executable File
124 lines
3.4 KiB
Dart
Executable File
import 'package:cssd/config/colors.dart';
|
|
import 'package:cssd/config/routes.dart';
|
|
import 'package:cssd/pages/MyItemsPages/Result/my_items_mine_screen.dart';
|
|
import 'package:cssd/pages/MyItemsPages/Result/my_items_requests_screen.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class MyItemsResultScreen extends StatefulWidget {
|
|
const MyItemsResultScreen({super.key});
|
|
|
|
@override
|
|
State<MyItemsResultScreen> createState() => _MyItemsResultScreenState();
|
|
}
|
|
|
|
class _MyItemsResultScreenState extends State<MyItemsResultScreen>
|
|
with SingleTickerProviderStateMixin {
|
|
late final TabController _tabController;
|
|
|
|
@override
|
|
void initState() {
|
|
_tabController = TabController(length: 2, vsync: this);
|
|
super.initState();
|
|
}
|
|
|
|
@override
|
|
void dispose() {
|
|
_tabController.dispose();
|
|
super.dispose();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final _media = MediaQuery.of(context);
|
|
final double _deviceWidth = _media.size.width;
|
|
final double _deviceBlockSize = _deviceWidth / 100;
|
|
return SafeArea(
|
|
child: GestureDetector(
|
|
onTap: () {
|
|
FocusManager.instance.primaryFocus?.unfocus();
|
|
},
|
|
child: DefaultTabController(
|
|
length: 2,
|
|
child: Scaffold(
|
|
appBar: AppBar(
|
|
titleSpacing: -10,
|
|
title: Text(
|
|
'Home',
|
|
style: TextStyle(
|
|
color: Colors.white,
|
|
),
|
|
),
|
|
backgroundColor: Colors.black,
|
|
leading: IconButton(
|
|
icon: Icon(
|
|
Icons.keyboard_arrow_left,
|
|
color: Colors.white,
|
|
size: 35,
|
|
),
|
|
onPressed: () =>
|
|
Navigator.of(context).pushNamed(Routes.homePage),
|
|
),
|
|
// bottom: TabBar(
|
|
// controller: _tabController,
|
|
// indicatorColor: kBlue,
|
|
// labelColor: Colors.white,
|
|
// tabs: [
|
|
// Tab(
|
|
// text: 'Mine',
|
|
// ),
|
|
// Tab(
|
|
// text: 'Requests',
|
|
// ),
|
|
// ],
|
|
// ),
|
|
),
|
|
floatingActionButton: MyItemResultFloatingButton(
|
|
deviceBlockSize: _deviceBlockSize,
|
|
),
|
|
body: MyItemsMineScreen(),
|
|
// TabBarView(
|
|
// controller: _tabController,
|
|
// children: [
|
|
// MyItemsMineScreen(),
|
|
// MyItemsRequestsScreen(),
|
|
// ],
|
|
// ),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class MyItemResultFloatingButton extends StatelessWidget {
|
|
const MyItemResultFloatingButton({
|
|
Key? key,
|
|
required double deviceBlockSize,
|
|
}) : _deviceBlockSize = deviceBlockSize,
|
|
super(key: key);
|
|
|
|
final double _deviceBlockSize;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return InkWell(
|
|
customBorder: CircleBorder(),
|
|
onTap: () {
|
|
Navigator.of(context).pushNamed(Routes.myItemsScanScreen);
|
|
},
|
|
child: Container(
|
|
padding: EdgeInsets.all(2.5 * _deviceBlockSize),
|
|
decoration: BoxDecoration(
|
|
shape: BoxShape.circle,
|
|
color: Colors.black,
|
|
),
|
|
child: Icon(
|
|
Icons.qr_code_scanner,
|
|
size: 7.1 * _deviceBlockSize,
|
|
color: Colors.white,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|