Skip to content

Commit

Permalink
chore: make all pages look the same
Browse files Browse the repository at this point in the history
  • Loading branch information
bonomat committed Jan 19, 2024
1 parent c3df11b commit cc41eef
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 47 deletions.
14 changes: 9 additions & 5 deletions webapp/frontend/lib/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final goRouter = GoRouter(
GoRoute(
path: TradeScreen.route,
pageBuilder: (context, state) => NoTransitionPage(
child: Scaffold(body: TradeScreen()),
child: routeChild(const TradeScreen()),
),
),
],
Expand All @@ -32,8 +32,8 @@ final goRouter = GoRouter(
routes: [
GoRoute(
path: WalletScreen.route,
pageBuilder: (context, state) => const NoTransitionPage(
child: WalletScreen(),
pageBuilder: (context, state) => NoTransitionPage(
child: routeChild(const WalletScreen()),
),
),
],
Expand All @@ -43,12 +43,16 @@ final goRouter = GoRouter(
routes: [
GoRoute(
path: SettingsScreen.route,
pageBuilder: (context, state) => const NoTransitionPage(
child: SettingsScreen(),
pageBuilder: (context, state) => NoTransitionPage(
child: routeChild(const SettingsScreen()),
),
),
],
)
],
)
]);

Scaffold routeChild(Widget child) {
return Scaffold(body: Container(padding: const EdgeInsets.all(25), child: Center(child: child)));
}
1 change: 0 additions & 1 deletion webapp/frontend/lib/trade/trade_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class _TradeScreenState extends State<TradeScreen> with SingleTickerProviderStat
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(25),
width: 500,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
Expand Down
79 changes: 38 additions & 41 deletions webapp/frontend/lib/wallet/wallet_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,50 +18,47 @@ class _WalletScreenState extends State<WalletScreen> with SingleTickerProviderSt

@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
padding: const EdgeInsets.all(25),
width: 500,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
TabBar(
unselectedLabelColor: Colors.black,
labelColor: tenTenOnePurple,
tabs: const [
Tab(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(FontAwesomeIcons.arrowDown, size: 20),
SizedBox(width: 10),
Text("Receive")
],
),
return Container(
width: 500,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
TabBar(
unselectedLabelColor: Colors.black,
labelColor: tenTenOnePurple,
tabs: const [
Tab(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(FontAwesomeIcons.arrowDown, size: 20),
SizedBox(width: 10),
Text("Receive")
],
),
Tab(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(FontAwesomeIcons.arrowUp, size: 20),
SizedBox(width: 10),
Text("Withdraw")
],
),
)
],
controller: _tabController,
indicatorSize: TabBarIndicatorSize.tab,
),
Expanded(
child: TabBarView(
controller: _tabController,
children: const [ReceiveScreen(), SendScreen()],
),
Tab(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(FontAwesomeIcons.arrowUp, size: 20),
SizedBox(width: 10),
Text("Withdraw")
],
),
)
],
controller: _tabController,
indicatorSize: TabBarIndicatorSize.tab,
),
Expanded(
child: TabBarView(
controller: _tabController,
children: const [ReceiveScreen(), SendScreen()],
),
],
),
),
],
),
);
}
Expand Down

0 comments on commit cc41eef

Please sign in to comment.