gecko/lib/main.dart

44 lines
1.0 KiB
Dart
Raw Normal View History

2020-12-13 05:43:52 +01:00
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
2020-12-21 01:05:00 +01:00
import 'home.dart';
2020-12-21 03:59:25 +01:00
import 'package:graphql_flutter/graphql_flutter.dart';
2021-01-06 05:04:54 +01:00
import 'package:sentry_flutter/sentry_flutter.dart';
2021-01-06 05:04:54 +01:00
// void main() => runApp(Gecko());
Future<void> main() async {
await SentryFlutter.init(
(options) {
options.dsn =
'https://c09587b46eaa42e8b9fda28d838ed180@o496840.ingest.sentry.io/5572110';
},
appRunner: () => runApp(Gecko()),
);
}
2020-12-13 05:43:52 +01:00
2020-12-21 01:05:00 +01:00
class Gecko extends StatelessWidget {
2020-12-13 05:43:52 +01:00
@override
Widget build(BuildContext context) {
2020-12-21 03:59:25 +01:00
final _httpLink = HttpLink(
// 'http://192.168.1.91:10060/gva',
'https://g1.librelois.fr/gva',
2020-12-21 03:59:25 +01:00
);
final _client = ValueNotifier(
GraphQLClient(
cache: GraphQLCache(store: null),
2020-12-21 03:59:25 +01:00
link: _httpLink,
),
);
2020-12-13 05:43:52 +01:00
return MaterialApp(
2020-12-21 01:05:00 +01:00
title: 'Ğecko',
theme:
ThemeData(primaryColor: Colors.blue[50], accentColor: Colors.black),
2020-12-21 03:59:25 +01:00
home: GraphQLProvider(
client: _client,
2021-01-06 05:04:54 +01:00
child: HomeScreen(),
2020-12-21 03:59:25 +01:00
),
);
2020-12-13 05:43:52 +01:00
}
}