-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
199 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:raven_back/raven_back.dart'; | ||
import 'package:raven_back/streams/streams.dart'; | ||
import 'package:raven_front/widgets/widgets.dart'; | ||
|
||
class BackLayer extends StatefulWidget { | ||
BackLayer({Key? key}) : super(key: key); | ||
|
||
@override | ||
_BackLayerState createState() => _BackLayerState(); | ||
} | ||
|
||
class _BackLayerState extends State<BackLayer> { | ||
late String pageTitle = 'Wallet'; | ||
late List listeners = []; | ||
|
||
@override | ||
void initState() { | ||
super.initState(); | ||
listeners.add(streams.app.page.stream.listen((value) { | ||
if (value != pageTitle) { | ||
setState(() { | ||
pageTitle = value; | ||
}); | ||
} | ||
})); | ||
} | ||
|
||
@override | ||
void dispose() { | ||
for (var listener in listeners) { | ||
listener.cancel(); | ||
} | ||
super.dispose(); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
if (pageTitle.startsWith('Wallet')) { | ||
return NavDrawer(); | ||
} else if (pageTitle == 'Send') { | ||
return BalanceHeader(); | ||
} | ||
return Container( | ||
height: 0, | ||
width: 0, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:raven_front/backdrop/backdrop.dart'; | ||
import 'package:raven_front/components/components.dart'; | ||
import 'package:raven_front/theme/extensions.dart'; | ||
|
||
class BalanceHeader extends StatefulWidget { | ||
BalanceHeader({Key? key}) : super(key: key); | ||
|
||
@override | ||
_BalanceHeaderState createState() => _BalanceHeaderState(); | ||
} | ||
|
||
class _BalanceHeaderState extends State<BalanceHeader> { | ||
List listeners = []; | ||
|
||
@override | ||
void initState() { | ||
super.initState(); | ||
Backdrop.of(components.navigator.routeContext!).revealBackLayer(); | ||
} | ||
|
||
@override | ||
void dispose() { | ||
for (var listener in listeners) { | ||
listener.cancel(); | ||
} | ||
super.dispose(); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
padding: EdgeInsets.all(16), | ||
child: ListView( | ||
shrinkWrap: true, | ||
children: [ | ||
Column( | ||
crossAxisAlignment: CrossAxisAlignment.center, | ||
children: [ | ||
Image.asset( | ||
'assets/rvnonly.png', | ||
height: 56, | ||
width: 56, | ||
), | ||
SizedBox(height: 8), | ||
Text('amount', style: Theme.of(context).balanceAmount), | ||
SizedBox(height: 1), | ||
Text('dollars', style: Theme.of(context).balanceDollar), | ||
SizedBox(height: 30), | ||
Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ | ||
Text('Remaining:', style: Theme.of(context).remaining), | ||
Text('amount', style: Theme.of(context).remaining) | ||
]), | ||
], | ||
) | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters