forked from firka/flutter
Analyze doc code snippets for all packages for which we publish docs (#132607)
Fixes TODO in the analyzer script :)
This commit is contained in:
committed by
GitHub
parent
e52e8da303
commit
14f9ed28d0
@@ -34,8 +34,10 @@ void usePathUrlStrategy() {
|
||||
/// ```dart
|
||||
/// import 'package:flutter_web_plugins/flutter_web_plugins.dart';
|
||||
///
|
||||
/// // Somewhere before calling `runApp()` do:
|
||||
/// setUrlStrategy(PathUrlStrategy());
|
||||
/// void main() {
|
||||
/// // Somewhere before calling `runApp()` do:
|
||||
/// setUrlStrategy(PathUrlStrategy());
|
||||
/// }
|
||||
/// ```
|
||||
class PathUrlStrategy extends ui_web.HashUrlStrategy {
|
||||
/// Creates an instance of [PathUrlStrategy].
|
||||
|
||||
@@ -99,8 +99,10 @@ void usePathUrlStrategy() {
|
||||
/// ```dart
|
||||
/// import 'package:flutter_web_plugins/flutter_web_plugins.dart';
|
||||
///
|
||||
/// // Somewhere before calling `runApp()` do:
|
||||
/// setUrlStrategy(const HashUrlStrategy());
|
||||
/// void main() {
|
||||
/// // Somewhere before calling `runApp()` do:
|
||||
/// setUrlStrategy(const HashUrlStrategy());
|
||||
/// }
|
||||
/// ```
|
||||
class HashUrlStrategy extends UrlStrategy {
|
||||
/// Creates an instance of [HashUrlStrategy].
|
||||
@@ -117,8 +119,10 @@ class HashUrlStrategy extends UrlStrategy {
|
||||
/// ```dart
|
||||
/// import 'package:flutter_web_plugins/flutter_web_plugins.dart';
|
||||
///
|
||||
/// // Somewhere before calling `runApp()` do:
|
||||
/// setUrlStrategy(PathUrlStrategy());
|
||||
/// void main() {
|
||||
/// // Somewhere before calling `runApp()` do:
|
||||
/// setUrlStrategy(PathUrlStrategy());
|
||||
/// }
|
||||
/// ```
|
||||
class PathUrlStrategy extends HashUrlStrategy {
|
||||
/// Creates an instance of [PathUrlStrategy].
|
||||
|
||||
@@ -9,6 +9,12 @@ import 'dart:ui_web' as ui_web;
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
// Examples can assume:
|
||||
// import 'package:flutter_web_plugins/flutter_web_plugins.dart';
|
||||
// import 'package:flutter/services.dart';
|
||||
// import 'dart:ui_web' as ui_web;
|
||||
// void handleFrameworkMessage(String name, ByteData? data, PlatformMessageResponseCallback? callback) { }
|
||||
|
||||
/// A registrar for Flutter plugins implemented in Dart.
|
||||
///
|
||||
/// Plugins for the web platform are implemented in Dart and are
|
||||
@@ -32,6 +38,11 @@ import 'package:flutter/services.dart';
|
||||
/// final MyPlugin instance = MyPlugin();
|
||||
/// channel.setMethodCallHandler(instance.handleMethodCall);
|
||||
/// }
|
||||
///
|
||||
/// Future<dynamic> handleMethodCall(MethodCall call) async {
|
||||
/// // ...
|
||||
/// }
|
||||
///
|
||||
/// // ...
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
Reference in New Issue
Block a user