style(dashboard): format code and add title margin
Some checks failed
ci/woodpecker/push/useragent-analyze Pipeline failed
Some checks failed
ci/woodpecker/push/useragent-analyze Pipeline failed
This commit is contained in:
@@ -22,15 +22,18 @@ class DashboardRouter extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final title = const Text("Arbiter", style: TextStyle(fontWeight: FontWeight.w800));
|
final title = Container(
|
||||||
|
margin: const EdgeInsets.all(16),
|
||||||
|
child: const Text(
|
||||||
|
"Arbiter",
|
||||||
|
style: TextStyle(fontWeight: FontWeight.w800),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
return AutoTabsRouter(
|
return AutoTabsRouter(
|
||||||
routes: routes,
|
routes: routes,
|
||||||
transitionBuilder: (context, child, animation) => FadeTransition(
|
transitionBuilder: (context, child, animation) =>
|
||||||
opacity: animation,
|
FadeTransition(opacity: animation, child: child),
|
||||||
child: child,
|
|
||||||
),
|
|
||||||
builder: (context, child) {
|
builder: (context, child) {
|
||||||
final tabsRouter = AutoTabsRouter.of(context);
|
final tabsRouter = AutoTabsRouter.of(context);
|
||||||
final currentActive = tabsRouter.activeIndex;
|
final currentActive = tabsRouter.activeIndex;
|
||||||
@@ -66,7 +69,7 @@ class DashboardRouter extends StatelessWidget {
|
|||||||
selectedIndex: currentActive,
|
selectedIndex: currentActive,
|
||||||
transitionDuration: const Duration(milliseconds: 800),
|
transitionDuration: const Duration(milliseconds: 800),
|
||||||
internalAnimations: true,
|
internalAnimations: true,
|
||||||
|
|
||||||
trailingNavRail: const _CalloutBell(),
|
trailingNavRail: const _CalloutBell(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -79,9 +82,7 @@ class _CalloutBell extends ConsumerWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final count = ref.watch(
|
final count = ref.watch(calloutManagerProvider.select((map) => map.length));
|
||||||
calloutManagerProvider.select((map) => map.length),
|
|
||||||
);
|
|
||||||
|
|
||||||
return IconButton(
|
return IconButton(
|
||||||
onPressed: () => showCalloutList(context, ref),
|
onPressed: () => showCalloutList(context, ref),
|
||||||
|
|||||||
Reference in New Issue
Block a user