This commit is contained in:
HooDie
2023-11-11 19:57:09 +03:30
parent b567d4dac9
commit f43f5cc54f
41 changed files with 1181 additions and 399 deletions
@@ -118,7 +118,7 @@ class _MyPackagesMineScreenState extends State<MyPackagesMineScreen> {
label: 'ID',
id: '',
name: package.filters!.name,
udi: package.filters!.udi,
// udi: package.filters!.udi,
)
: Container(),
package.filters!.name != ''
@@ -127,18 +127,18 @@ class _MyPackagesMineScreenState extends State<MyPackagesMineScreen> {
label: 'Package Name',
id: package.filters!.id,
name: '',
udi: package.filters!.udi,
)
: Container(),
package.filters!.udi != ''
? MyPackageFilterChip(
deviceBlockSize: _deviceBlockSize,
label: 'UDI',
id: package.filters!.id,
name: package.filters!.name,
udi: '',
// udi: package.filters!.udi,
)
: Container(),
// package.filters!.udi != ''
// ? MyPackageFilterChip(
// deviceBlockSize: _deviceBlockSize,
// label: 'UDI',
// id: package.filters!.id,
// name: package.filters!.name,
// udi: '',
// )
// : Container(),
],
),
);
@@ -1,4 +1,5 @@
import 'package:cssd/config/colors.dart';
import 'package:cssd/config/routes.dart';
import 'package:cssd/pages/MyPackagesPages/Result/my_packages_mine_screen.dart';
import 'package:cssd/pages/MyPackagesPages/Result/my_packages_requests_screen.dart';
import 'package:flutter/material.dart';
@@ -28,6 +29,9 @@ class _MyPackagesResultScreenState extends State<MyPackagesResultScreen>
@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: () {
@@ -60,6 +64,9 @@ class _MyPackagesResultScreenState extends State<MyPackagesResultScreen>
],
),
),
floatingActionButton: MyPackageResultFloatingButton(
deviceBlockSize: _deviceBlockSize,
),
body: TabBarView(
controller: _tabController,
children: [
@@ -73,3 +80,35 @@ class _MyPackagesResultScreenState extends State<MyPackagesResultScreen>
);
}
}
class MyPackageResultFloatingButton extends StatelessWidget {
const MyPackageResultFloatingButton({
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.myPackagesScanScreen);
},
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,
),
),
);
}
}