1import 'package:flutter/material.dart';
2import 'package:go_router/go_router.dart';
4import '../theme/color_palette.dart';
32 State<CustomScaffold>
createState() => _CustomScaffoldState();
35class _CustomScaffoldState
extends State<CustomScaffold> {
61 Widget
build(BuildContext context) {
62 return NotificationListener<ScrollNotification>(
63 onNotification: (scrollNotification) {
64 if (scrollNotification is ScrollUpdateNotification) {
66 _showShadow = scrollNotification.metrics.pixels > 0;
72 backgroundColor: widget.backgroundColor,
74 appBar: widget.title == null
78 surfaceTintColor: Colors.transparent,
79 shadowColor: Colors.black26,
80 bottom: widget.bottomWidget,
84 style: Theme.of(context)
87 ?.copyWith(fontWeight: FontWeight.w900),
89 actions: widget.actions,
90 automaticallyImplyLeading:
false,
91 leading: widget.isLeadingVisible
93 onPressed: (widget.isBackButtonEnabled && !widget.isLoading)
98 child:
const Icon(Icons.arrow_back),
102 body: widget.onRefresh != null ? RefreshIndicator(
105 onRefresh: () async => widget.onRefresh?.call(),
118 if (widget.isLoading)
120 child: AbsorbPointer(
122 color: Colors.black.withValues(alpha: 0.5),
123 child:
const Loading(),
override void initState()
class App extends StatefulWidget build(BuildContext context)
class CustomScaffold extends StatefulWidget _scrollController
style Text( '${ 'scheduling.reference'.tr()}:${collection.internalCode}', style:Theme.of(context).textTheme.bodySmall,)
style SizedBox(height:2.h)