Обновлен проект. Добавлена БД
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
|
||||
import 'package:remever/common/functions.dart';
|
||||
import 'package:remever/common/resources.dart';
|
||||
import 'package:remever/common/widgets/typography.dart';
|
||||
import 'package:remever/common/widgets/wspace.dart';
|
||||
import 'package:remever/components/extensions/context.dart';
|
||||
import 'package:remever/gen/assets.gen.dart';
|
||||
import 'package:remever/router.gr.dart';
|
||||
import 'package:remever/screens/dialogs/filters_dialog.dart';
|
||||
|
||||
class CollectionsAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
const CollectionsAppBar({super.key});
|
||||
|
||||
@override
|
||||
Size get preferredSize => Size.fromHeight(66.h);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppBar(
|
||||
toolbarHeight: 66.h,
|
||||
backgroundColor: AppColors.white,
|
||||
shadowColor: Colors.transparent,
|
||||
title: Row(
|
||||
children: <Widget>[
|
||||
GestureDetector(
|
||||
onLongPress: () => context.pushRoute(const SandboxRoute()),
|
||||
child: AppTypography(
|
||||
'Коллекции',
|
||||
type: SemiBold28px(),
|
||||
color: AppColors.body_text,
|
||||
),
|
||||
),
|
||||
const WSpace(2),
|
||||
Container(
|
||||
height: 22.h,
|
||||
width: 38.w,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.secondary,
|
||||
borderRadius: BorderRadius.circular(40).r,
|
||||
),
|
||||
child: Center(
|
||||
child: AppTypography(
|
||||
'2213',
|
||||
type: Regular12px(),
|
||||
color: AppColors.body_text,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: <Widget>[
|
||||
AppBarIconButton(icon: Assets.icons.typeSearch, onTap: () {}),
|
||||
AppBarIconButton(icon: Assets.icons.typeDownload, onTap: () {}),
|
||||
AppBarIconButton(
|
||||
icon: Assets.icons.typeSort,
|
||||
onTap: () {
|
||||
showCuperModalBottomSheet(
|
||||
context: context,
|
||||
height: 424.h,
|
||||
builder: (BuildContext context) => const FiltersDialog(),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AppBarIconButton extends StatelessWidget {
|
||||
const AppBarIconButton({required this.icon, required this.onTap, super.key});
|
||||
|
||||
final AssetGenImage icon;
|
||||
final void Function()? onTap;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: SizedBox(
|
||||
width: 48.h,
|
||||
child: Center(child: icon.image(height: 24.h, width: 24.w)),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user