start adding login flow
This commit is contained in:
parent
c0c4c02815
commit
c76a8f3c28
14 changed files with 634 additions and 58 deletions
35
lib/widgets/appbar.dart
Normal file
35
lib/widgets/appbar.dart
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import "dart:io";
|
||||
import "package:flutter/material.dart";
|
||||
|
||||
class Appbar extends StatelessWidget implements PreferredSizeWidget {
|
||||
final Widget? leading;
|
||||
final Widget? title;
|
||||
final Color? backgroundColor;
|
||||
final double? scrolledUnderElevation;
|
||||
final List<Widget> actions;
|
||||
const Appbar({
|
||||
super.key,
|
||||
this.title,
|
||||
this.backgroundColor,
|
||||
this.scrolledUnderElevation,
|
||||
this.leading,
|
||||
this.actions = const [],
|
||||
});
|
||||
|
||||
@override
|
||||
Size get preferredSize => AppBar().preferredSize;
|
||||
|
||||
@override
|
||||
AppBar build(BuildContext context) => AppBar(
|
||||
leading: leading,
|
||||
backgroundColor: backgroundColor,
|
||||
scrolledUnderElevation: scrolledUnderElevation,
|
||||
actionsPadding: EdgeInsets.symmetric(horizontal: 8),
|
||||
title: title,
|
||||
actions: [
|
||||
...actions,
|
||||
if (!(Platform.isAndroid || Platform.isIOS))
|
||||
IconButton(onPressed: () => exit(0), icon: Icon(Icons.close)),
|
||||
],
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue