mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This PR moves the core of `browser_detection.dart` to a location in `dart:ui_web` so it can be used by apps and plugins. In order for the code to be a little bit tidier in ui_web, it's encapsulated in a singleton instance that can be accessed through `BrowserDetection.instance` or a top level global `browser` in `dart:ui_web`. ## Issues * Needed to fix: https://github.com/flutter/flutter/issues/128943 * Needed to land: https://github.com/flutter/flutter/pull/147346 ## Tests Updated affected tests. Mostly the update was to call the methods from `web_ui.browser.methodName` rather than a global scope. Also split the tests for this module in two files: * `engine_browser_detect_test.dart` - with the tests specific to the engine (capability detection, etc...) * `browser_detect_test.dart` - only the tests pertaining to the "core" of the library. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Description
Flutter makes it easy and fast to build beautiful apps for mobile and beyond
androidapp-frameworkcross-platformdartdart-platformdesktopflutterflutter-packagefuchsiaioslinux-desktopmacosmaterial-designmobilemobile-developmentskiawebweb-frameworkwindows
2.5 GiB
Languages
Dart
75%
C++
16.5%
Objective-C++
2.9%
Java
2.8%
Objective-C
0.7%
Other
1.9%