Newer
Older

poka
committed
import 'package:flutter/material.dart';
import 'package:dubp/dubp.dart';
import 'package:gecko/models/home.dart';
import 'package:gecko/models/my_wallets.dart';
import 'package:gecko/screens/myWallets/generate_wallets.dart';

poka
committed
import 'dart:io';
import 'package:provider/provider.dart';
// ignore: must_be_immutable
class SettingsScreen extends StatelessWidget {

poka
committed
String generatedMnemonic;
bool walletIsGenerated = false;
NewWallet actualWallet;
String newWalletName;
bool hasError = false;
String validPin = 'NO PIN';
String currentText = "";
var pinColor = Colors.grey[300];
Directory appPath;
final MyWalletsProvider _myWallets = MyWalletsProvider();
SettingsScreen({Key key}) : super(key: key);

poka
committed
@override
Widget build(BuildContext context) {
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
HomeProvider _homeProvider = Provider.of<HomeProvider>(context);

poka
committed
// getAppDirectory();
return Scaffold(
appBar: AppBar(

poka
committed
body: Column(children: <Widget>[
SizedBox(
width: 500,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
elevation: 5,
onPrimary: Colors.black, // foreground
),
onPressed: () => Navigator.push(
context,
MaterialPageRoute(builder: (context) {
}),
).then((value) => {
if (value == true) {Navigator.pop(context)}
}),
SizedBox(
width: 500,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
elevation: 5,
onPrimary: Colors.black, // foreground
),
onPressed: () => Navigator.push(
context,
MaterialPageRoute(builder: (context) {
return GenerateFastChestScreen();

poka
committed
Expanded(
child: Align(
alignment: Alignment.bottomCenter,
child: SizedBox(
height: 100,
width: 500,

poka
committed
child: ElevatedButton(

poka
committed
style: ElevatedButton.styleFrom(
elevation: 5,
primary: Colors.redAccent, // background

poka
committed
onPrimary: Colors.black, // foreground
),

poka
committed
onPressed: () async => {
await _myWallets
.deleteAllWallet(context)
.then((v) => _homeProvider.rebuildWidget())

poka
committed
},

poka
committed
style: TextStyle(fontSize: 20)))))),