This commit is contained in:
poka 2021-01-01 17:52:55 +01:00
parent 68170e1829
commit 7652b8e602
6 changed files with 23 additions and 19 deletions

View File

@ -7,7 +7,8 @@ import "package:gql_link/gql_link.dart";
import 'package:intl/intl.dart';
// 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
// Future getHttp() async {

View File

@ -1 +0,0 @@

View File

@ -5,7 +5,7 @@ import 'dart:ui';
import 'package:permission_handler/permission_handler.dart';
import 'package:qrscan/qrscan.dart' as scanner;
import 'api.dart';
import "package:dio/dio.dart";
// import "package:dio/dio.dart";
import 'package:graphql_flutter/graphql_flutter.dart';
import 'query.dart';
@ -15,13 +15,14 @@ class HistoryListScreen extends StatefulWidget {
_HistoryListScreenState createState() => _HistoryListScreenState();
}
class _HistoryListScreenState extends State<HistoryListScreen> {
class _HistoryListScreenState extends State<HistoryListScreen>
with ChangeNotifier {
Uint8List bytes = Uint8List(0);
TextEditingController _outputPubkey;
TextEditingController _outputBalance;
final nRepositories = 3;
var pubkey = '';
var titi = 'totooooooop';
bool isBuilding = true; // Just for debug
ScrollController _scrollController = new ScrollController();
@override
@ -42,7 +43,7 @@ class _HistoryListScreenState extends State<HistoryListScreen> {
// var pubkey = '';
print('Build state : ' + pubkey);
print(titi);
print('isBuilding: ' + isBuilding.toString());
return MaterialApp(
home: Scaffold(
backgroundColor: Colors.grey[300],
@ -278,11 +279,11 @@ class _HistoryListScreenState extends State<HistoryListScreen> {
)));
}
Future checkNode() async {
final response = await Dio().post(graphqlEndpoint);
showHistory(response);
return response;
}
// Future checkNode() async {
// final response = await Dio().post(graphqlEndpoint);
// showHistory(response);
// return response;
// }
Future _scan() async {
await Permission.camera.request();
@ -310,6 +311,8 @@ class _HistoryListScreenState extends State<HistoryListScreen> {
// var tata = _scrollController;
notifyListeners();
setState(() {
print('setPubkey: ' + pubkey);
pubkey = pubkey;

View File

@ -5,15 +5,16 @@ import 'package:flutter/material.dart';
import 'home.dart';
import 'package:graphql_flutter/graphql_flutter.dart';
void main() {
runApp(Gecko());
}
void main() => runApp(Gecko());
class Gecko extends StatelessWidget {
@override
Widget build(BuildContext context) {
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(

View File

@ -218,14 +218,14 @@ packages:
name: graphql
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0-beta.5"
version: "4.0.0-beta.6"
graphql_flutter:
dependency: "direct main"
description:
name: graphql_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0-beta.5"
version: "4.0.0-beta.6"
hive:
dependency: transitive
description:

View File

@ -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.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 0.0.0+4
version: 0.0.0+5
environment:
sdk: ">=2.7.0 <3.0.0"
@ -34,7 +34,7 @@ dependencies:
intl:
flutter_launcher_icons: "^0.8.0"
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: