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
<!-- Copyright 2011 the Dart project authors. All rights reserved. | |
Use of this source code is governed by a BSD-style license | |
that can be found in the LICENSE file. --> | |
<h2>Dart streams!</h2> | |
<div> | |
<canvas id="canvas" width="300" height="300"></canvas> | |
</div> |
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
{"lastUpload":"2020-07-30T07:52:04.215Z","extensionVersion":"v3.4.3"} |
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:dio/dio.dart'; | |
import 'package:dio/src/dio.dart'; | |
import 'package:my_test_app/config/application_config.dart'; | |
import 'package:my_test_app/dependency_injection/dependency_injector_base.dart'; | |
import 'package:my_test_app/features/login/login_bloc.dart'; | |
import 'package:my_test_app/features/login/login_service.dart'; | |
import 'package:my_test_app/features/splash/splash_bloc.dart'; | |
import 'package:my_test_app/features/splash/splash_service.dart'; | |
class DependencyInjector extends DependencyInjectorBase { |
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 Config { | |
static final bool enable = false; | |
} | |
class Features { | |
void runCheck() { | |
List<String> features = [ | |
"feature1", | |
if (Config.enable) "feature2", | |
]; |
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 Config { | |
static const bool enable = false; | |
} | |
class Features { | |
void runCheck() { | |
List<String> features = [ | |
"feature1", | |
if (Config.enable) "feature2", | |
]; |
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'; | |
typedef SnapshotBuilder<T> = Widget Function(AsyncSnapshot<T>); | |
class SnapshotHelper<T> { | |
final AsyncSnapshot<T> snapshot; | |
SnapshotHelper._(this.snapshot); | |
factory SnapshotHelper.of(AsyncSnapshot snapshot) => |
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
function createAuth0Manager(clientParameters, onAuthenticated, onAuthError) { | |
return new Auth0Manager(clientParameters, onAuthenticated, onAuthError); | |
} | |
class Auth0Manager { | |
constructor(clientParameters, onAuthenticated, onAuthError) { | |
this.clientParameters = clientParameters; | |
this.onAuthenticated = onAuthenticated; | |
this.onAuthError = onAuthError; | |
this.auth0Client = new auth0.WebAuth({ |
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 'dart:async'; | |
import 'dart:convert'; | |
import 'dart:js' as js; | |
import 'package:my_app/providers/user_provider/model/user.dart'; | |
import 'package:my_app/providers/user_provider/user_provider.dart'; | |
import 'auth_manager.dart'; | |
void _alert(dynamic param) { |
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
abstract class AuthManager { | |
static AuthManager _instance; | |
static AuthManager get instance { | |
if (_instance == null) { | |
if (kIsWeb) { | |
_instance = Auth0ManagerForWeb(); | |
} else { | |
_instance = Auth0Manager(); | |
} |