WIP: A few bugs, Dewif unencryption very slow

This commit is contained in:
poka 2021-12-19 21:05:04 +01:00
parent ca812123a5
commit 2c67307399
17 changed files with 110 additions and 221 deletions

View File

@ -65,10 +65,28 @@ In a dart file (e.g. `lib/main.dart`), type the `F5` key to build the code. The
#### Linux #### Linux
Build debug for linux: Install dependancies:
`sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev`
Then build debug for linux:
`flutter run -d linux` `flutter run -d linux`
If you get this error:
```
flutter /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:643 (_pkg_check_modules_internal)
```
Please try:
`sudo apt install liblzma-dev`
then
`flutter clean && flutter run -d linux`
## Roadmap ## Roadmap
- v0.1.0 (expected date: 21-08-16) - v0.1.0 (expected date: 21-08-16)

View File

@ -38,7 +38,6 @@ import 'package:gecko/screens/search.dart';
import 'package:gecko/screens/search_result.dart'; import 'package:gecko/screens/search_result.dart';
import 'package:graphql_flutter/graphql_flutter.dart'; import 'package:graphql_flutter/graphql_flutter.dart';
import 'package:hive_flutter/hive_flutter.dart'; import 'package:hive_flutter/hive_flutter.dart';
import 'package:path_provider/path_provider.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:responsive_framework/responsive_framework.dart'; import 'package:responsive_framework/responsive_framework.dart';
@ -51,12 +50,11 @@ Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
HomeProvider _homeProvider = HomeProvider(); HomeProvider _homeProvider = HomeProvider();
appPath = await getApplicationDocumentsDirectory();
appVersion = await _homeProvider.getAppVersion(); appVersion = await _homeProvider.getAppVersion();
prefs = await SharedPreferences.getInstance(); prefs = await SharedPreferences.getInstance();
// Configure Hive and open boxes // Configure Hive and open boxes
await Hive.initFlutter(appPath.path); await Hive.initFlutter();
Hive.registerAdapter(WalletDataAdapter()); Hive.registerAdapter(WalletDataAdapter());
Hive.registerAdapter(ChestDataAdapter()); Hive.registerAdapter(ChestDataAdapter());
Hive.registerAdapter(G1WalletsListAdapter()); Hive.registerAdapter(G1WalletsListAdapter());
@ -185,7 +183,7 @@ class Gecko extends StatelessWidget {
home: const HomeScreen(), home: const HomeScreen(),
initialRoute: "/", initialRoute: "/",
routes: { routes: {
'/mywallets': (context) => WalletsHome(), '/mywallets': (context) => const WalletsHome(),
'/search': (context) => const SearchScreen(), '/search': (context) => const SearchScreen(),
'/searchResult': (context) => const SearchResultScreen(), '/searchResult': (context) => const SearchResultScreen(),
}, },

View File

@ -37,7 +37,6 @@ class GenerateWalletsProvider with ChangeNotifier {
bool isCesiumIDVisible = false; bool isCesiumIDVisible = false;
bool isCesiumPWDVisible = false; bool isCesiumPWDVisible = false;
bool canImport = false; bool canImport = false;
bool isPinChanged = false;
// Import Chest // Import Chest
TextEditingController cellController0 = TextEditingController(); TextEditingController cellController0 = TextEditingController();
@ -152,17 +151,6 @@ class GenerateWalletsProvider with ChangeNotifier {
notifyListeners(); notifyListeners();
} }
Future<String> genMnemonic() async {
try {
generatedMnemonic = generateMnemonic(lang: 'french');
actualWallet = await generateWallet(generatedMnemonic, isImport: false);
walletIsGenerated = true;
} catch (e) {
log.e(e);
}
return generatedMnemonic;
}
Future<NewWallet> generateWallet(String generatedMnemonic, Future<NewWallet> generateWallet(String generatedMnemonic,
{@required bool isImport}) async { {@required bool isImport}) async {
try { try {
@ -182,18 +170,13 @@ class GenerateWalletsProvider with ChangeNotifier {
return actualWallet; return actualWallet;
} }
Future<NewWallet> changePinCode({bool reload}) async { String changePinCode({bool reload}) {
actualWallet = Dewif().changePassword(
dewif: actualWallet.dewif, pin.text = randomSecretCode(5);
oldPassword: actualWallet.password,
);
pin.text = actualWallet.password;
isPinChanged = true;
if (reload) { if (reload) {
notifyListeners(); notifyListeners();
} }
return actualWallet; return pin.text;
} }
Future<Uint8List> printWallet(String _title) async { Future<Uint8List> printWallet(String _title) async {
@ -243,7 +226,6 @@ class GenerateWalletsProvider with ChangeNotifier {
cesiumPubkey.text = _walletPubkey; cesiumPubkey.text = _walletPubkey;
pin.text = actualWallet.password; pin.text = actualWallet.password;
isPinChanged = true;
log.d(_walletPubkey); log.d(_walletPubkey);
} }
@ -260,7 +242,6 @@ class GenerateWalletsProvider with ChangeNotifier {
cesiumPWD.text = ''; cesiumPWD.text = '';
cesiumPubkey.text = ''; cesiumPubkey.text = '';
canImport = false; canImport = false;
isPinChanged = false;
pin.text = ''; pin.text = '';
isCesiumIDVisible = false; isCesiumIDVisible = false;
isCesiumPWDVisible = false; isCesiumPWDVisible = false;
@ -306,18 +287,18 @@ class GenerateWalletsProvider with ChangeNotifier {
void resetCesiumImportView() { void resetCesiumImportView() {
cesiumID.text = cesiumPWD.text = cesiumPubkey.text = pin.text = ''; cesiumID.text = cesiumPWD.text = cesiumPubkey.text = pin.text = '';
canImport = isPinChanged = isCesiumIDVisible = isCesiumPWDVisible = false; canImport = isCesiumIDVisible = isCesiumPWDVisible = false;
actualWallet = null; actualWallet = null;
notifyListeners(); notifyListeners();
} }
Future<List<String>> generateWordList() async { List<String> generateWordList() {
final String _sentance = await genMnemonic(); generatedMnemonic = generateMnemonic(lang: 'french');
List<String> _wordsList = []; List<String> _wordsList = [];
String word; String word;
int _nbr = 1; int _nbr = 1;
for (word in _sentance.split(' ')) { for (word in generatedMnemonic.split(' ')) {
_wordsList.add("$_nbr:$word"); _wordsList.add("$_nbr:$word");
_nbr++; _nbr++;
} }

View File

@ -10,6 +10,7 @@ import 'package:gecko/globals.dart';
import 'package:gecko/screens/old_history_pay.dart'; import 'package:gecko/screens/old_history_pay.dart';
import 'package:gecko/screens/myWallets/wallets_home.dart'; import 'package:gecko/screens/myWallets/wallets_home.dart';
import 'package:package_info/package_info.dart'; import 'package:package_info/package_info.dart';
import 'package:flutter/foundation.dart' show kIsWeb;
class HomeProvider with ChangeNotifier { class HomeProvider with ChangeNotifier {
int _currentIndex = 0; int _currentIndex = 0;
@ -20,7 +21,7 @@ class HomeProvider with ChangeNotifier {
Widget appBarExplorer = Widget appBarExplorer =
Text('Explorateur', style: TextStyle(color: Colors.grey[850])); Text('Explorateur', style: TextStyle(color: Colors.grey[850]));
List currentTab = [OldHistoryScreen(), WalletsHome()]; List currentTab = [OldHistoryScreen(), const WalletsHome()];
bool isFirstBuild = true; bool isFirstBuild = true;
// AudioCache player = AudioCache(prefix: 'sounds/'); // AudioCache player = AudioCache(prefix: 'sounds/');
@ -34,7 +35,7 @@ class HomeProvider with ChangeNotifier {
Future<String> getAppVersion() async { Future<String> getAppVersion() async {
String version; String version;
String buildNumber; String buildNumber;
if (Platform.isLinux) { if (kIsWeb || Platform.isLinux) {
version = "undefined"; version = "undefined";
buildNumber = "undefined"; buildNumber = "undefined";
} else { } else {

View File

@ -28,8 +28,8 @@ class WalletOptionsProvider with ChangeNotifier {
Future<NewWallet> get badWallet => null; Future<NewWallet> get badWallet => null;
Future _getPubkeyFromDewif( String _getPubkeyFromDewif(
String _dewif, _pin, int _pinLenght, int derivation) async { String _dewif, _pin, int _pinLenght, int derivation) {
String _pubkey; String _pubkey;
RegExp regExp = RegExp( RegExp regExp = RegExp(
r'^[A-Z0-9]+$', r'^[A-Z0-9]+$',
@ -45,6 +45,7 @@ class WalletOptionsProvider with ChangeNotifier {
try { try {
final _wallet = HdWallet.fromDewif(_dewif, _pin); final _wallet = HdWallet.fromDewif(_dewif, _pin);
_pubkey = _wallet.getPubkey(derivation); _pubkey = _wallet.getPubkey(derivation);
log.d(_pubkey);
pubkey.text = _pubkey; pubkey.text = _pubkey;
notifyListeners(); notifyListeners();
@ -70,14 +71,14 @@ class WalletOptionsProvider with ChangeNotifier {
} }
} }
Future readLocalWallet( String readLocalWallet(
context, WalletData _wallet, String _pin, int _pinLenght) async { context, WalletData _wallet, String _pin, int _pinLenght) {
isWalletUnlock = false; isWalletUnlock = false;
try { try {
String _localDewif = chestBox.get(_wallet.chest).dewif; String _localDewif = chestBox.get(_wallet.chest).dewif;
String _localPubkey; String _localPubkey;
if ((_localPubkey = await _getPubkeyFromDewif( if ((_localPubkey = _getPubkeyFromDewif(
_localDewif, _pin, _pinLenght, _wallet.derivation)) != _localDewif, _pin, _pinLenght, _wallet.derivation)) !=
'false') { 'false') {
pubkey.text = _localPubkey; pubkey.text = _localPubkey;
@ -94,21 +95,6 @@ class WalletOptionsProvider with ChangeNotifier {
} }
} }
Future checkPinOK(String _createdDewif, String _pin, int _pinLenght) async {
isWalletUnlock = false;
try {
if (await _getPubkeyFromDewif(_createdDewif, _pin, _pinLenght, 3) !=
'false') {
return true;
} else {
throw false;
}
} catch (e) {
log.e('ERROR READING FILE: $e');
return false;
}
}
int getPinLenght(_walletNbr) { int getPinLenght(_walletNbr) {
// TODO: Get real Dewif lenght // TODO: Get real Dewif lenght
// String _localDewif; // String _localDewif;

View File

@ -25,7 +25,6 @@ class GenerateFastChestScreen extends StatelessWidget {
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
GenerateWalletsProvider _generateWalletProvider = GenerateWalletsProvider _generateWalletProvider =
Provider.of<GenerateWalletsProvider>(context); Provider.of<GenerateWalletsProvider>(context);
_generateWalletProvider.genMnemonic();
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
@ -40,7 +39,7 @@ class GenerateFastChestScreen extends StatelessWidget {
child: FittedBox( child: FittedBox(
child: FloatingActionButton( child: FloatingActionButton(
heroTag: "buttonGenerateWallet", heroTag: "buttonGenerateWallet",
onPressed: () => _generateWalletProvider.genMnemonic(), onPressed: () => _generateWalletProvider.generateWordList(),
child: SizedBox( child: SizedBox(
height: 40.0, height: 40.0,
width: 40.0, width: 40.0,
@ -89,7 +88,7 @@ class GenerateFastChestScreen extends StatelessWidget {
color: orangeC, color: orangeC,
onPressed: () { onPressed: () {
_generateWalletProvider.changePinCode( _generateWalletProvider.changePinCode(
reload: false); reload: true);
}, },
), ),
], ],

View File

@ -164,8 +164,7 @@ class ImportWalletScreen extends StatelessWidget {
primary: yellowC, // background primary: yellowC, // background
onPrimary: Colors.black, // foreground onPrimary: Colors.black, // foreground
), ),
onPressed: _generateWalletProvider.canImport && onPressed: _generateWalletProvider.canImport
_generateWalletProvider.isPinChanged
? () { ? () {
_generateWalletProvider _generateWalletProvider
.importCesiumWallet() .importCesiumWallet()

View File

@ -92,7 +92,7 @@ class RestoreChest extends StatelessWidget {
await Navigator.push( await Navigator.push(
context, context,
FaderTransition( FaderTransition(
page: OnboardingStepThirteen(), isFast: true), page: const OnboardingStepThirteen(), isFast: true),
); );
} else { } else {
await badMnemonicPopup(context); await badMnemonicPopup(context);

View File

@ -180,7 +180,7 @@ class UnlockingWallet extends StatelessWidget {
onCompleted: (_pin) async { onCompleted: (_pin) async {
log.d("Completed"); log.d("Completed");
_myWalletProvider.pinCode = _pin; _myWalletProvider.pinCode = _pin;
final String resultWallet = await _walletOptions.readLocalWallet( final String resultWallet = _walletOptions.readLocalWallet(
context, wallet, _pin.toUpperCase(), _pinLenght); context, wallet, _pin.toUpperCase(), _pinLenght);
// _myWalletProvider.pinCode = _pin.toUpperCase(); // _myWalletProvider.pinCode = _pin.toUpperCase();
_myWalletProvider.pinLenght = _pinLenght; _myWalletProvider.pinLenght = _pinLenght;

View File

@ -14,9 +14,7 @@ import 'package:graphql_flutter/graphql_flutter.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class WalletsHome extends StatelessWidget { class WalletsHome extends StatelessWidget {
final _derivationKey = GlobalKey<FormState>(); const WalletsHome({Key key}) : super(key: key);
WalletsHome({Key key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -167,8 +165,8 @@ class WalletsHome extends StatelessWidget {
Padding( Padding(
padding: const EdgeInsets.all(16), padding: const EdgeInsets.all(16),
child: GestureDetector( child: GestureDetector(
onTap: () async { onTap: () {
await _walletOptions.readLocalWallet( _walletOptions.readLocalWallet(
context, context,
_repository, _repository,
_myWalletProvider.pinCode, _myWalletProvider.pinCode,
@ -351,56 +349,6 @@ class WalletsHome extends StatelessWidget {
), ),
]))); ])));
} }
Widget addNewDerivationPopup(context) {
final TextEditingController _newDerivationName = TextEditingController();
MyWalletsProvider _myWalletProvider =
Provider.of<MyWalletsProvider>(context);
return AlertDialog(
content: Stack(
clipBehavior: Clip.hardEdge,
children: <Widget>[
Form(
key: _derivationKey,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
const Text('Nom du portefeuille:'),
Padding(
padding: const EdgeInsets.all(8.0),
child: TextFormField(
key: const Key('DerivationNameKey'),
controller: _newDerivationName,
textAlign: TextAlign.center,
autofocus: true,
),
),
const SizedBox(height: 20),
Padding(
padding: const EdgeInsets.all(8.0),
child: ElevatedButton(
key: const Key('validDerivation'),
style: ElevatedButton.styleFrom(
elevation: 1,
primary: yellowC, // background
onPrimary: Colors.black, // foreground
),
onPressed: () async {
await _myWalletProvider
.generateNewDerivation(
context, _newDerivationName.text)
.then((_) => _newDerivationName.text == '');
},
child: const Text("Créer")),
)
],
),
),
],
),
);
}
} }
// extension Range on num { // extension Range on num {

View File

@ -50,7 +50,8 @@ class OnboardingStepTwelve extends StatelessWidget {
Navigator.push( Navigator.push(
context, context,
FaderTransition( FaderTransition(
page: OnboardingStepThirteen(), isFast: true), page: const OnboardingStepThirteen(),
isFast: true),
); );
}, },
child: const Text("Générer le code secret", child: const Text("Générer le code secret",

View File

@ -1,5 +1,4 @@
// ignore_for_file: file_names // ignore_for_file: file_names
import 'package:durt/durt.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
@ -10,10 +9,9 @@ import 'package:provider/provider.dart';
// ignore: must_be_immutable // ignore: must_be_immutable
class OnboardingStepThirteen extends StatelessWidget { class OnboardingStepThirteen extends StatelessWidget {
NewWallet generatedWallet;
final int progress = 10; final int progress = 10;
OnboardingStepThirteen({Key key}) : super(key: key); const OnboardingStepThirteen({Key key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -23,19 +21,13 @@ class OnboardingStepThirteen extends StatelessWidget {
// MyWalletsProvider myWalletProvider = // MyWalletsProvider myWalletProvider =
// Provider.of<MyWalletsProvider>(context); // Provider.of<MyWalletsProvider>(context);
CommonElements common = CommonElements(); CommonElements common = CommonElements();
_generateWalletProvider.pin.text = ''; _generateWalletProvider.pin.text =
_generateWalletProvider.changePinCode(reload: false);
return Scaffold( return Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
body: SafeArea( body: SafeArea(
child: Column(children: <Widget>[ child: Column(children: <Widget>[
FutureBuilder(
future: _generateWalletProvider.changePinCode(reload: false),
// initialData: '...',
builder: (context, snapshot) {
generatedWallet = snapshot.data;
return const Visibility(visible: false, child: Text(''));
}),
common.onboardingProgressBar( common.onboardingProgressBar(
context, 'Ma phrase de restauration', progress), context, 'Ma phrase de restauration', progress),
common.bubbleSpeakRich( common.bubbleSpeakRich(
@ -71,9 +63,8 @@ class OnboardingStepThirteen extends StatelessWidget {
IconButton( IconButton(
icon: const Icon(Icons.replay), icon: const Icon(Icons.replay),
color: orangeC, color: orangeC,
onPressed: () async { onPressed: () {
generatedWallet = await _generateWalletProvider _generateWalletProvider.changePinCode(reload: true);
.changePinCode(reload: false);
}, },
), ),
], ],
@ -91,9 +82,8 @@ class OnboardingStepThirteen extends StatelessWidget {
primary: const Color(0xffFFD58D), primary: const Color(0xffFFD58D),
onPrimary: Colors.black, // foreground onPrimary: Colors.black, // foreground
), ),
onPressed: () async { onPressed: () {
generatedWallet = await _generateWalletProvider _generateWalletProvider.changePinCode(reload: true);
.changePinCode(reload: false);
}, },
child: const Text("Choisir un autre code secret", child: const Text("Choisir un autre code secret",
style: TextStyle(fontSize: 20))), style: TextStyle(fontSize: 20))),
@ -115,9 +105,7 @@ class OnboardingStepThirteen extends StatelessWidget {
Navigator.push( Navigator.push(
context, context,
FaderTransition( FaderTransition(
page: OnboardingStepFourteen( page: OnboardingStepFourteen(), isFast: true),
generatedWallet: generatedWallet),
isFast: true),
); );
}, },
child: const Text("J'ai noté mon code secret", child: const Text("J'ai noté mon code secret",

View File

@ -17,10 +17,8 @@ import 'package:provider/provider.dart';
class OnboardingStepFourteen extends StatelessWidget { class OnboardingStepFourteen extends StatelessWidget {
OnboardingStepFourteen({ OnboardingStepFourteen({
Key validationKey, Key validationKey,
@required this.generatedWallet,
}) : super(key: validationKey); }) : super(key: validationKey);
NewWallet generatedWallet;
final int progress = 11; final int progress = 11;
final formKey = GlobalKey<FormState>(); final formKey = GlobalKey<FormState>();
var pinColor = const Color(0xFFA4B600); var pinColor = const Color(0xFFA4B600);
@ -29,12 +27,12 @@ class OnboardingStepFourteen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
// GenerateWalletsProvider _generateWalletProvider = GenerateWalletsProvider _generateWalletProvider =
// Provider.of<GenerateWalletsProvider>(context); Provider.of<GenerateWalletsProvider>(context);
WalletOptionsProvider _walletOptions = WalletOptionsProvider _walletOptions =
Provider.of<WalletOptionsProvider>(context); Provider.of<WalletOptionsProvider>(context);
CommonElements common = CommonElements(); CommonElements common = CommonElements();
final int _pinLenght = _walletOptions.getPinLenght(generatedWallet.dewif); final int _pinLenght = _generateWalletProvider.pin.text.length;
return Scaffold( return Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
@ -113,13 +111,16 @@ class OnboardingStepFourteen extends StatelessWidget {
blurRadius: 10, blurRadius: 10,
) )
], ],
onCompleted: (_pin) async { onCompleted: (_pin) {
_myWalletProvider.pinCode = _pin; _myWalletProvider.pinCode = _pin;
_myWalletProvider.pinLenght = _pinLenght; _myWalletProvider.pinLenght = _pinLenght;
final bool resultWallet = await _walletOptions.checkPinOK( log.d(_pin + ' || ' + _generateWalletProvider.pin.text);
generatedWallet.dewif, _pin.toUpperCase(), _pinLenght); if (_pin.toUpperCase() == _generateWalletProvider.pin.text) {
if (resultWallet) {
pinColor = Colors.green[500]; pinColor = Colors.green[500];
NewWallet generatedWallet = Dewif().generateDewif(
_generateWalletProvider.generatedMnemonic,
_generateWalletProvider.pin.text,
lang: 'french');
_generateWalletProvider.storeHDWChest( _generateWalletProvider.storeHDWChest(
generatedWallet, 'Mon portefeuille courant', context); generatedWallet, 'Mon portefeuille courant', context);
_myWalletProvider.readAllWallets(_currentChest); _myWalletProvider.readAllWallets(_currentChest);

View File

@ -113,64 +113,47 @@ Widget sentanceArray(BuildContext context) {
GenerateWalletsProvider _generateWalletProvider = GenerateWalletsProvider _generateWalletProvider =
Provider.of<GenerateWalletsProvider>(context); Provider.of<GenerateWalletsProvider>(context);
return FutureBuilder( List formatedArray = _generateWalletProvider.generateWordList();
future: _generateWalletProvider.generateWordList(),
initialData: const [ return Container(
'1:...', padding: const EdgeInsets.symmetric(horizontal: 12),
'2:...', child: Container(
'3:...', decoration: BoxDecoration(
'4:...', border: Border.all(color: Colors.black),
'5:...', color: Colors.grey[300],
'6:...', borderRadius: const BorderRadius.all(
'7:...', Radius.circular(10),
'8:...', )),
'9:...', // color: Colors.grey[300],
'10:...', padding: const EdgeInsets.all(20),
'11:...', child: Column(
'12:...', mainAxisAlignment: MainAxisAlignment.center,
], mainAxisSize: MainAxisSize.max,
builder: (context, formatedArray) { crossAxisAlignment: CrossAxisAlignment.center,
// print(formatedArray.data); children: <Widget>[
return Container( Row(children: <Widget>[
padding: const EdgeInsets.symmetric(horizontal: 12), arrayCell(formatedArray[0]),
child: Container( arrayCell(formatedArray[1]),
decoration: BoxDecoration( arrayCell(formatedArray[2]),
border: Border.all(color: Colors.black), arrayCell(formatedArray[3]),
color: Colors.grey[300], ]),
borderRadius: const BorderRadius.all( const SizedBox(height: 15),
Radius.circular(10), Row(children: <Widget>[
)), arrayCell(formatedArray[4]),
// color: Colors.grey[300], arrayCell(formatedArray[5]),
padding: const EdgeInsets.all(20), arrayCell(formatedArray[6]),
child: Column( arrayCell(formatedArray[7]),
mainAxisAlignment: MainAxisAlignment.center, ]),
mainAxisSize: MainAxisSize.max, const SizedBox(height: 15),
crossAxisAlignment: CrossAxisAlignment.center, Row(children: <Widget>[
children: <Widget>[ arrayCell(formatedArray[8]),
Row(children: <Widget>[ arrayCell(formatedArray[9]),
arrayCell(formatedArray.data[0]), arrayCell(formatedArray[10]),
arrayCell(formatedArray.data[1]), arrayCell(formatedArray[11]),
arrayCell(formatedArray.data[2]), ]),
arrayCell(formatedArray.data[3]), ]),
]), ),
const SizedBox(height: 15), );
Row(children: <Widget>[
arrayCell(formatedArray.data[4]),
arrayCell(formatedArray.data[5]),
arrayCell(formatedArray.data[6]),
arrayCell(formatedArray.data[7]),
]),
const SizedBox(height: 15),
Row(children: <Widget>[
arrayCell(formatedArray.data[8]),
arrayCell(formatedArray.data[9]),
arrayCell(formatedArray.data[10]),
arrayCell(formatedArray.data[11]),
]),
]),
),
);
});
} }
Widget arrayCell(dataWord) { Widget arrayCell(dataWord) {

View File

@ -294,7 +294,7 @@ packages:
name: durt name: durt
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.3+3" version: "0.1.4"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:

View File

@ -5,7 +5,7 @@ description: Pay with G1.
# pub.dev using `pub publish`. This is preferred for private packages. # pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 0.0.3+14 version: 0.0.4+1
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"
@ -56,7 +56,7 @@ dependencies:
xml: ^5.3.0 xml: ^5.3.0
pull_to_refresh: ^2.0.0 pull_to_refresh: ^2.0.0
dio: ^4.0.4 dio: ^4.0.4
durt: ^0.1.3+3 durt: ^0.1.4
flutter_icons: flutter_icons:
android: "ic_launcher" android: "ic_launcher"

View File

@ -1,14 +0,0 @@
#!/bin/bash
set -e
MY_PATH="`dirname \"$0\"`"
MY_PATH="`( cd \"$MY_PATH\" && pwd )`"
cd $MY_PATH/..
cargo bd
cargo make android-dev
cargo br
echo -e "\nRust dependencies have been successfully build !"