@@ -4,6 +4,7 @@ import 'package:account_ledger_library/account_ledger_gist_api.dart';
44import 'package:account_ledger_library/account_ledger_gist_api_interactive.dart' ;
55import 'package:account_ledger_library/models/account_ledger_gist_model_v2.dart' ;
66import 'package:args/command_runner.dart' ;
7+ import 'package:tuple/tuple.dart' ;
78
89class ProcessGistV3AccountLedgerCommand extends Command {
910 @override
@@ -15,20 +16,24 @@ class ProcessGistV3AccountLedgerCommand extends Command {
1516
1617 @override
1718 Future <void > run () async {
18- await processAccountLedgerGistV2InterActive (
19- AccountLedgerGistV2Model .fromJson (
20- jsonDecode (
21- runAccountLedgerGistV3Operation (
22- actionsBeforeExecution: () {
23- print ('Running GistV3 Operation' );
24- },
25- actionsAfterExecution: (String result) {
26- // print('Result : $result');
27- },
28- ),
29- ),
30- ),
31- isVersion3: true ,
19+ Tuple2 <bool , String > gistOperationResult = runAccountLedgerGistV3Operation (
20+ actionsBeforeExecution: () {
21+ print ('Running GistV3 Operation' );
22+ },
23+ actionsAfterExecution: (String result) {
24+ // print('Result : $result');
25+ },
3226 );
27+ if (gistOperationResult.item1) {
28+ await processAccountLedgerGistV2InterActive (
29+ AccountLedgerGistV2Model .fromJson (
30+ jsonDecode (gistOperationResult.item2),
31+ ),
32+ isVersion3: true ,
33+ );
34+ } else {
35+ print ("Gist Operation Failure..." );
36+ print (gistOperationResult.item2);
37+ }
3338 }
3439}
0 commit comments