add pagination for pages

This commit is contained in:
tzw
2024-01-24 16:54:08 +06:30
parent 4b9dc7bdc2
commit 0dc32067b8
34 changed files with 399 additions and 2249 deletions

View File

@@ -0,0 +1,53 @@
import 'package:fcs/helpers/theme.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'local_text.dart';
class LocalAppBar extends StatelessWidget implements PreferredSizeWidget {
final String? labelKey;
final Color? backgroundColor;
final Color? labelColor;
final Color? arrowColor;
final List<Widget>? actions;
final Widget? titleWidget;
final Function()? onBack;
const LocalAppBar(
{Key? key,
this.labelKey,
this.backgroundColor = primaryColor,
this.labelColor,
this.arrowColor = Colors.white,
this.actions,
this.titleWidget,
this.onBack})
: super(key: key);
@override
Size get preferredSize => const Size.fromHeight(56);
@override
Widget build(BuildContext context) {
return AppBar(
elevation: 0,
centerTitle: true,
leading: IconButton(
icon: Icon(CupertinoIcons.back, color: arrowColor, size: 25),
onPressed: onBack),
shadowColor: Colors.transparent,
backgroundColor: backgroundColor,
surfaceTintColor: backgroundColor,
title: titleWidget ??
(labelKey != null
? LocalText(
context,
labelKey!,
color: Colors.white,
fontSize: 20,
)
: const SizedBox()),
actions: actions,
);
}
}