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 'package:web/web.dart' as web; | |
| import 'package:dart_webrtc/dart_webrtc.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| const MyApp({super.key}); |
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"; | |
| class FutureRegistry { | |
| final List<Future> _futures = []; | |
| void register(Future f) { | |
| _futures.add(f); | |
| f.whenComplete(() { | |
| _futures.remove(f); | |
| }); |
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 2019 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. | |
| import 'package:flutter/material.dart'; | |
| import 'dart:js_interop'; | |
| void main() => runApp(const MyApp()); | |
| @JS('window.flutterCanvasKit.HEAP8.byteLength') |
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"; | |
| class AutoOverlayPortal extends StatefulWidget { | |
| const AutoOverlayPortal( | |
| {super.key, required this.overlayChildBuilder, this.child}); | |
| final Widget Function(BuildContext) overlayChildBuilder; | |
| final Widget? child; | |
| @override |
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/cupertino.dart'; | |
| import 'package:flutter/foundation.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter/services.dart'; | |
| import 'dart:async'; | |
| void main() => runApp(const EditableTextToolbarBuilderExampleApp()); | |
| class EditableTextToolbarBuilderExampleApp extends StatefulWidget { | |
| const EditableTextToolbarBuilderExampleApp({super.key}); |
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 'package:flutter/foundation.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:uri/uri.dart'; | |
| class PathRouteMatch { | |
| PathRouteMatch( | |
| {required this.parameters, | |
| required this.route, |
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"; | |
| abstract class Controller extends ChangeNotifier { | |
| static T ofType<T extends Controller>(BuildContext context) { | |
| return context | |
| .dependOnInheritedWidgetOfExactType<_ControllerModel<T>>()! | |
| .controller; | |
| } | |
| static T? maybeOfType<T extends Controller>(BuildContext context) { |
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
| void main() { | |
| print(fullName(null, null)); | |
| print(fullName('John', null)); | |
| print(fullName(null, 'Doe')); | |
| print(fullName("John", 'Doe')); | |
| } |
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 2019 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. | |
| import 'package:flutter/material.dart'; | |
| void main() => runApp(const MyApp()); | |
| class MyApp extends StatelessWidget { | |
| const MyApp({super.key}); |
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 UIKit | |
| import Flutter | |
| import app_links | |
| @UIApplicationMain | |
| @objc class AppDelegate: FlutterAppDelegate { | |
| override func application( | |
| _ application: UIApplication, | |
| didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? |