Skip to content

Commit

Permalink
Merge pull request #5 from peercoin/v.0.1.2
Browse files Browse the repository at this point in the history
V.0.1.2
  • Loading branch information
Willy authored Mar 21, 2021
2 parents 5652ec2 + 9b60048 commit 156aefe
Show file tree
Hide file tree
Showing 14 changed files with 319 additions and 203 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ app.*.symbols

# Obfuscation related
app.*.map.json
.vscode/launch.json
2 changes: 2 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:allowBackup="false"
android:fullBackupContent="false"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
Expand Down
6 changes: 6 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ PODS:
- Flutter
- shared_preferences (0.0.1):
- Flutter
- url_launcher (0.0.1):
- Flutter

DEPENDENCIES:
- Flutter (from `Flutter`)
Expand All @@ -20,6 +22,7 @@ DEPENDENCIES:
- qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`)
- share (from `.symlinks/plugins/share/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)

SPEC REPOS:
trunk:
Expand All @@ -38,6 +41,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/share/ios"
shared_preferences:
:path: ".symlinks/plugins/shared_preferences/ios"
url_launcher:
:path: ".symlinks/plugins/url_launcher/ios"

SPEC CHECKSUMS:
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
Expand All @@ -47,6 +52,7 @@ SPEC CHECKSUMS:
qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e
share: 0b2c3e82132f5888bccca3351c504d0003b3b410
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef

PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c

Expand Down
4 changes: 4 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ class MyApp extends StatelessWidget {
child: MaterialApp(
title: 'Peercoin',
theme: ThemeData(
textTheme: Theme.of(context).textTheme.apply(
fontSizeFactor: 1.1,
fontSizeDelta: 2.0,
),
primaryColor: Color.fromRGBO(60, 176, 84, 1),
accentColor: Colors.grey,
errorColor: Colors.red,
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/new_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Map<String, Coin> availableCoins = AvailableCoins().availableCoins;
List activeCoins = [];

class _NewWalletScreenState extends State<NewWalletScreen> {
String _coin;
String _coin = "";

addWallet(ctx) async {
try {
Expand All @@ -26,7 +26,7 @@ class _NewWalletScreenState extends State<NewWalletScreen> {
} catch (e) {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(
"Adding wallet failed!",
_coin == "" ? "Please select a coin" : "Adding wallet failed!",
textAlign: TextAlign.center,
),
duration: Duration(seconds: 2),
Expand Down
41 changes: 25 additions & 16 deletions lib/screens/setup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,32 @@ class _SetupScreenState extends State<SetupScreen> {
return Scaffold(
body: Container(
color: Theme.of(context).primaryColor,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
alignment: Alignment.center,
width: double.infinity,
child: const Text(
"Setup",
style: TextStyle(color: Colors.white),
child: Container(
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset("assets/icon/ppc-icon-white-48.png"),
SizedBox(height: 60),
Padding(
padding: EdgeInsets.symmetric(horizontal: 50),
child: const Text(
"Create all the necessary files to get started with your wallet.",
style: TextStyle(color: Colors.white),
),
),
),
SizedBox(height: 20),
TextButton(
onPressed: () => {createWallet(context)},
child: _loading ? LoadingIndicator() : Text("Create Wallet"),
)
],
SizedBox(height: 30),
TextButton(
onPressed: () => {createWallet(context)},
child: _loading
? LoadingIndicator()
: Text(
"Create Wallet",
style: TextStyle(fontSize: 18),
),
)
],
),
),
),
);
Expand Down
39 changes: 27 additions & 12 deletions lib/screens/setup_save_seed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,38 @@ class _SetupSaveScreenState extends State<SetupSaveScreen> {
Widget build(BuildContext context) {
return Scaffold(
body: Container(
padding: EdgeInsets.symmetric(horizontal: 30),
color: Theme.of(context).primaryColor,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset("assets/icon/ppc-icon-white-48.png"),
SizedBox(height: 30),
Container(
alignment: Alignment.center,
width: double.infinity,
child: const Text(
"Save your seed",
"This is your wallet seed:",
style: TextStyle(color: Colors.white),
),
),
Container(
alignment: Alignment.center,
width: double.infinity,
child: Padding(
padding: EdgeInsets.all(50),
child: SelectableText(
seed,
style: TextStyle(color: Colors.white70, wordSpacing: 10),
),
SizedBox(height: 40),
Center(
child: SelectableText(
seed,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
wordSpacing: 10),
),
),
SizedBox(height: 40),
Text(
"Make sure to keep it safe.\nTreat it like a password.\nThose 12 simple words give full access to your wallet.",
style: TextStyle(color: Colors.white),
textAlign: TextAlign.center,
),
SizedBox(height: 30),
sharedYet
? TextButton(
onPressed: () async {
Expand All @@ -74,11 +83,17 @@ class _SetupSaveScreenState extends State<SetupSaveScreen> {
Navigator.popAndPushNamed(
context, WalletListScreen.routeName);
},
child: const Text("Continue"),
child: const Text(
"Continue",
style: TextStyle(fontSize: 18),
),
)
: TextButton(
onPressed: () => shareSeed(seed),
child: const Text("Export"),
child: const Text(
"Export now",
style: TextStyle(fontSize: 18),
),
)
],
),
Expand Down
1 change: 1 addition & 0 deletions lib/screens/transaction_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class TransactionDetails extends StatelessWidget {
SelectableText(_tx.confirmations.toString())
],
),
SizedBox(height: 20),
Center(
child: TextButton.icon(
onPressed: () => _launchURL(baseUrl + "${_tx.txid}"),
Expand Down
21 changes: 13 additions & 8 deletions lib/screens/wallet_home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class _WalletHomeState extends State<WalletHomeScreen>
Text(
_wallet.letterCode,
style: TextStyle(
fontSize: 24, color: Theme.of(context).accentColor),
fontSize: 26, color: Theme.of(context).accentColor),
),
Column(
children: [
Expand All @@ -186,15 +186,15 @@ class _WalletHomeState extends State<WalletHomeScreen>
child: Text(
(_wallet.balance / 1000000).toString(),
style: TextStyle(
fontSize: 24, fontWeight: FontWeight.bold),
fontSize: 26, fontWeight: FontWeight.bold),
),
),
_wallet.unconfirmedBalance > 0
? Text(
(_wallet.unconfirmedBalance / 1000000)
.toString(),
style: TextStyle(
fontSize: 12,
fontSize: 14,
color: Theme.of(context).accentColor),
)
: Container(),
Expand Down Expand Up @@ -225,10 +225,15 @@ class _WalletHomeState extends State<WalletHomeScreen>
),
),
),
SelectableText(
_unusedAddress,
style: TextStyle(
fontWeight: FontWeight.bold),
Padding(
padding: const EdgeInsets.all(8.0),
child: FittedBox(
child: SelectableText(
_unusedAddress,
style: TextStyle(
fontWeight: FontWeight.bold),
),
),
)
]))
]);
Expand All @@ -254,7 +259,7 @@ class _WalletHomeState extends State<WalletHomeScreen>
"connected",
style: TextStyle(
color: Theme.of(context).accentColor,
fontSize: 10),
fontSize: 12),
),
],
)
Expand Down
44 changes: 35 additions & 9 deletions lib/widgets/receive_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,45 @@ class _ReceiveTabState extends State<ReceiveTab> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
QrImage(
data: _qrString ?? widget._unusedAddress,
size: MediaQuery.of(context).size.width * 0.3,
padding: EdgeInsets.all(1),
InkWell(
onTap: () {
showDialog(
context: context,
builder: (BuildContext context) {
return SimpleDialog(children: [
Center(
child: SizedBox(
height: MediaQuery.of(context).size.height * 0.33,
width: MediaQuery.of(context).size.width * 1,
child: Center(
child: QrImage(
data: _qrString ?? widget._unusedAddress,
),
),
),
)
]);
},
);
},
child: QrImage(
data: _qrString ?? widget._unusedAddress,
size: MediaQuery.of(context).size.width * 0.3,
padding: EdgeInsets.all(1),
),
),
SizedBox(height: 10),
SizedBox(height: 20),
Container(
color: Theme.of(context).accentColor,
decoration: BoxDecoration(
color: Theme.of(context).accentColor,
borderRadius: BorderRadius.all(Radius.circular(4))),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: SelectableText(
widget._unusedAddress,
style: TextStyle(color: Colors.white),
child: FittedBox(
child: SelectableText(
widget._unusedAddress,
style: TextStyle(color: Colors.white),
),
),
),
),
Expand Down
Loading

0 comments on commit 156aefe

Please sign in to comment.