This repository has been archived by the owner on Jul 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add sentry error reporting, fix vertical orientation, make dev anonym…
…ous, refactor message sending to separate class (and fix bug), change swiping suggestions order
- Loading branch information
Showing
11 changed files
with
197 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import 'dart:async'; | ||
|
||
import 'package:feature_discovery/feature_discovery.dart'; | ||
import 'package:firebase_core/firebase_core.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter/services.dart'; | ||
import 'package:provider/provider.dart'; | ||
import 'package:sentry_flutter/sentry_flutter.dart' as sentry; | ||
import 'package:tundr/pages/about.dart'; | ||
import 'package:tundr/pages/edit_profile.dart'; | ||
import 'package:tundr/pages/me.dart'; | ||
|
@@ -32,18 +36,22 @@ import 'package:tundr/widgets/handlers/app_state_handler.dart'; | |
import 'package:tundr/widgets/handlers/notification_handler.dart'; | ||
import 'package:tundr/widgets/rebuilder.dart'; | ||
|
||
void main() { | ||
runApp(Rebuilder( | ||
child: MultiProvider( | ||
providers: [ | ||
Provider<User>(create: (context) => User()), | ||
Provider<RegistrationInfo>(create: (context) => RegistrationInfo()), | ||
ChangeNotifierProvider<ThemeManager>( | ||
create: (context) => ThemeManager()), | ||
], | ||
child: TundrApp(), | ||
), | ||
)); | ||
Future<void> main() async { | ||
await sentry.SentryFlutter.init( | ||
(options) => options.dsn = | ||
'https://[email protected]/5624275', | ||
appRunner: () => runApp(Rebuilder( | ||
child: MultiProvider( | ||
providers: [ | ||
Provider<User>(create: (context) => User()), | ||
Provider<RegistrationInfo>(create: (context) => RegistrationInfo()), | ||
ChangeNotifierProvider<ThemeManager>( | ||
create: (context) => ThemeManager()), | ||
], | ||
child: TundrApp(), | ||
), | ||
)), | ||
); | ||
} | ||
|
||
class TundrApp extends StatefulWidget { | ||
|
@@ -94,6 +102,8 @@ class _TundrAppState extends State<TundrApp> { | |
|
||
@override | ||
Widget build(BuildContext context) { | ||
SystemChrome.setPreferredOrientations( | ||
[DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]); | ||
return Consumer<User>( | ||
builder: (context, user, child) { | ||
Widget home; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.