Skip to content
Snippets Groups Projects
Commit 7652b8e6 authored by poka's avatar poka
Browse files

progress

parent 68170e18
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,8 @@ import "package:gql_link/gql_link.dart"; ...@@ -7,7 +7,8 @@ import "package:gql_link/gql_link.dart";
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
// Configure node // Configure node
const graphqlEndpoint = "https://g1.librelois.fr/gva"; // const graphqlEndpoint = "https://g1.librelois.fr/gva";
const graphqlEndpoint = 'http://127.0.0.1:10060/gva';
// // Check node connection // // Check node connection
// Future getHttp() async { // Future getHttp() async {
......
...@@ -5,7 +5,7 @@ import 'dart:ui'; ...@@ -5,7 +5,7 @@ import 'dart:ui';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:qrscan/qrscan.dart' as scanner; import 'package:qrscan/qrscan.dart' as scanner;
import 'api.dart'; import 'api.dart';
import "package:dio/dio.dart"; // import "package:dio/dio.dart";
import 'package:graphql_flutter/graphql_flutter.dart'; import 'package:graphql_flutter/graphql_flutter.dart';
import 'query.dart'; import 'query.dart';
...@@ -15,13 +15,14 @@ class HistoryListScreen extends StatefulWidget { ...@@ -15,13 +15,14 @@ class HistoryListScreen extends StatefulWidget {
_HistoryListScreenState createState() => _HistoryListScreenState(); _HistoryListScreenState createState() => _HistoryListScreenState();
} }
class _HistoryListScreenState extends State<HistoryListScreen> { class _HistoryListScreenState extends State<HistoryListScreen>
with ChangeNotifier {
Uint8List bytes = Uint8List(0); Uint8List bytes = Uint8List(0);
TextEditingController _outputPubkey; TextEditingController _outputPubkey;
TextEditingController _outputBalance; TextEditingController _outputBalance;
final nRepositories = 3; final nRepositories = 3;
var pubkey = ''; var pubkey = '';
var titi = 'totooooooop'; bool isBuilding = true; // Just for debug
ScrollController _scrollController = new ScrollController(); ScrollController _scrollController = new ScrollController();
@override @override
...@@ -42,7 +43,7 @@ class _HistoryListScreenState extends State<HistoryListScreen> { ...@@ -42,7 +43,7 @@ class _HistoryListScreenState extends State<HistoryListScreen> {
// var pubkey = ''; // var pubkey = '';
print('Build state : ' + pubkey); print('Build state : ' + pubkey);
print(titi); print('isBuilding: ' + isBuilding.toString());
return MaterialApp( return MaterialApp(
home: Scaffold( home: Scaffold(
backgroundColor: Colors.grey[300], backgroundColor: Colors.grey[300],
...@@ -278,11 +279,11 @@ class _HistoryListScreenState extends State<HistoryListScreen> { ...@@ -278,11 +279,11 @@ class _HistoryListScreenState extends State<HistoryListScreen> {
))); )));
} }
Future checkNode() async { // Future checkNode() async {
final response = await Dio().post(graphqlEndpoint); // final response = await Dio().post(graphqlEndpoint);
showHistory(response); // showHistory(response);
return response; // return response;
} // }
Future _scan() async { Future _scan() async {
await Permission.camera.request(); await Permission.camera.request();
...@@ -310,6 +311,8 @@ class _HistoryListScreenState extends State<HistoryListScreen> { ...@@ -310,6 +311,8 @@ class _HistoryListScreenState extends State<HistoryListScreen> {
// var tata = _scrollController; // var tata = _scrollController;
notifyListeners();
setState(() { setState(() {
print('setPubkey: ' + pubkey); print('setPubkey: ' + pubkey);
pubkey = pubkey; pubkey = pubkey;
......
...@@ -5,15 +5,16 @@ import 'package:flutter/material.dart'; ...@@ -5,15 +5,16 @@ import 'package:flutter/material.dart';
import 'home.dart'; import 'home.dart';
import 'package:graphql_flutter/graphql_flutter.dart'; import 'package:graphql_flutter/graphql_flutter.dart';
void main() { void main() => runApp(Gecko());
runApp(Gecko());
}
class Gecko extends StatelessWidget { class Gecko extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final _httpLink = HttpLink( final _httpLink = HttpLink(
'https://g1.librelois.fr/gva', 'http://127.0.0.1:30901/gva',
// defaultHeaders: <String, String>{
// 'Content-Type': 'application/json',
// },
); );
final _client = ValueNotifier( final _client = ValueNotifier(
......
...@@ -218,14 +218,14 @@ packages: ...@@ -218,14 +218,14 @@ packages:
name: graphql name: graphql
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.0.0-beta.5" version: "4.0.0-beta.6"
graphql_flutter: graphql_flutter:
dependency: "direct main" dependency: "direct main"
description: description:
name: graphql_flutter name: graphql_flutter
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.0.0-beta.5" version: "4.0.0-beta.6"
hive: hive:
dependency: transitive dependency: transitive
description: description:
......
...@@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev ...@@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 0.0.0+4 version: 0.0.0+5
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"
...@@ -34,7 +34,7 @@ dependencies: ...@@ -34,7 +34,7 @@ dependencies:
intl: intl:
flutter_launcher_icons: "^0.8.0" flutter_launcher_icons: "^0.8.0"
infinite_scroll_pagination: ^2.2.3 infinite_scroll_pagination: ^2.2.3
graphql_flutter: ^4.0.0-beta.5 #^3.1.0 graphql_flutter: ^4.0.0-beta.6 #^3.1.0
flutter_icons: flutter_icons:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment