git-touch-android-ios-app/lib/main.dart

51 lines
1.3 KiB
Dart
Raw Normal View History

2018-04-18 14:38:28 +02:00
import 'package:flutter/material.dart';
2019-01-22 16:39:44 +01:00
import 'package:flutter/cupertino.dart';
2018-04-20 18:59:26 +02:00
import 'ios/main.dart';
import 'providers/event.dart';
import 'providers/notification.dart';
2019-01-23 12:52:51 +01:00
import 'providers/search.dart';
2018-04-18 14:38:28 +02:00
class App extends StatelessWidget {
final isIos = true;
final EventBloc eventBloc;
final NotificationBloc notificationBloc;
2019-01-23 12:52:51 +01:00
final SearchBloc searchBloc;
2019-01-23 12:52:51 +01:00
App(this.eventBloc, this.notificationBloc, this.searchBloc);
@override
build(context) {
2019-01-23 12:52:51 +01:00
return SearchProvider(
bloc: searchBloc,
child: NotificationProvider(
bloc: notificationBloc,
child: EventProvider(
bloc: eventBloc,
child: MaterialApp(
title: 'GitFlux',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: DefaultTextStyle(
style: TextStyle(color: CupertinoColors.black),
child: IosHomePage(title: 'GitFlux'),
),
routes: {
// '/notification': (context) => IosNotificationTab(),
// '/profile': (context) => IosProfileTab(),
},
),
),
2019-01-22 16:39:44 +01:00
),
);
}
}
void main() {
EventBloc eventBloc = EventBloc();
NotificationBloc notificationBloc = NotificationBloc();
2019-01-23 12:52:51 +01:00
SearchBloc searchBloc = SearchBloc();
2019-01-23 12:52:51 +01:00
runApp(App(eventBloc, notificationBloc, searchBloc));
}