This file contains hidden or 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
import 'auth_manager.dart'; | |
import 'dart:js' as js; | |
//other imports | |
class Auth0ManagerForWeb extends AuthManager { | |
@override | |
Future<User> login([Map<String, String> authResponse]) async { | |
//stuff that uses dart:js | |
} |
This file contains hidden or 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
import 'package:flutter_auth0/flutter_auth0.dart'; | |
//other imports | |
class Auth0Manager extends AuthManager { | |
@override | |
Future<User> login([Map<String, String> authResponse]) async { | |
//stuff that uses classic dart.io | |
} | |
@override | |
Future<User> userFromTokens(String idToken, String accessToken) async { |
This file contains hidden or 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
import 'auth_manager.dart'; | |
AuthManager getManager() => | |
throw UnsupportedError('Cannot create an auth manager'); |
This file contains hidden or 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
//in auth0_manager.dart | |
AuthManager getManager() => Auth0Manager(); | |
//in auth0_manager_for_web.dart | |
AuthManager getManager() => Auth0ManagerForWeb(); |
This file contains hidden or 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
import 'auth0_manager_stub.dart' | |
if (dart.library.io) 'auth0_manager.dart' | |
if (dart.library.js) 'auth0_manager_for_web.dart'; | |
abstract class AuthManager { | |
static AuthManager _instance; | |
static AuthManager get instance { | |
_instance ??= getManager(); | |
return _instance; |
This file contains hidden or 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
import 'package:flutter/material.dart'; | |
import 'dart:async'; | |
final Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { |
This file contains hidden or 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
class AutocompleteQuery { | |
final String query; | |
final LatLng location; | |
final double radius; | |
AutocompleteQuery(this.query, {this.location, this.radius = 3000}); | |
} | |
class AutocompleteBloc extends BlocBase { | |
final _autocompletePlacesInputSubject = PublishSubject<AutocompleteQuery>(); |
This file contains hidden or 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
import 'package:flare_dart/math/mat2d.dart'; | |
import 'package:flare_flutter/flare.dart'; | |
import 'package:flare_flutter/flare_actor.dart'; | |
import 'package:flare_flutter/flare_controller.dart'; | |
import 'package:flutter/material.dart'; | |
class FlareAnimationWidget extends StatefulWidget { | |
final Color fillColor; | |
final Color strokeColor; |
This file contains hidden or 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
import 'package:corona_italy/features/infection_report/bloc/infection_report_bloc_state.dart'; | |
import 'package:corona_italy/features/infection_report/model/regional/regional_report_vm.dart'; | |
abstract class RegionalReportState extends InfectionReportBlocState {} | |
class RegionalReportIdle extends RegionalReportState {} | |
class RegionalReportLoading extends RegionalReportState {} | |
class RegionalReportLoaded extends RegionalReportState { |
This file contains hidden or 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
import 'package:corona_italy/features/infection_report/bloc/infection_report_bloc_event.dart'; | |
abstract class RegionalReportBlocEvent extends InfectionReportBlocEvent {} | |
class RegionalReportFetch extends RegionalReportBlocEvent {} |