我的网摘
win11系统,当我使用v2rayN开启网络代理之后,如何在powershell中挂上代理?
Gitee API 文档
天地图API
location install | Flutter package
location example | Flutter package
location | Flutter package
本站点使用 MrDoc 构建
-
+
location example | Flutter package
**[example/lib/main.dart](https://github.com/Lyokone/flutterlocation/blob/master/packages/location/example/lib/main.dart)** ``` import 'package:example/change_settings.dart'; import 'package:example/enable_in_background.dart'; import 'package:flutter/material.dart'; import 'package:location/location.dart'; import 'package:url_launcher/url_launcher.dart'; import 'change_notification.dart'; import 'get_location.dart'; import 'listen_location.dart'; import 'permission_status.dart'; import 'service_enabled.dart'; const _url = 'https://github.com/Lyokone/flutterlocation'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Location', theme: ThemeData( primarySwatch: Colors.amber, ), home: const MyHomePage(title: 'Flutter Location Demo'), ); } } class MyHomePage extends StatefulWidget { const MyHomePage({super.key, this.title}); final String? title; @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { final Location location = Location(); Future<void> _showInfoDialog() { return showDialog<void>( context: context, builder: (context) { return AlertDialog( title: const Text('Demo Application'), content: SingleChildScrollView( child: ListBody( children: <Widget>[ const Text('Created by Guillaume Bernos'), InkWell( child: const Text( _url, style: TextStyle( decoration: TextDecoration.underline, ), ), onTap: () => launchUrl(Uri.parse(_url)), ), ], ), ), actions: <Widget>[ TextButton( child: const Text('Ok'), onPressed: () { Navigator.of(context).pop(); }, ), ], ); }, ); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.title!), actions: <Widget>[ IconButton( icon: const Icon(Icons.info_outline), onPressed: _showInfoDialog, ), ], ), body: SingleChildScrollView( child: Container( padding: const EdgeInsets.all(32), child: const Column( children: [ PermissionStatusWidget(), Divider(height: 32), ServiceEnabledWidget(), Divider(height: 32), GetLocationWidget(), Divider(height: 32), ListenLocationWidget(), Divider(height: 32), ChangeSettings(), Divider(height: 32), EnableInBackgroundWidget(), Divider(height: 32), ChangeNotificationWidget(), ], ), ), ), ); } } ``` copied to clipboard
lx271896700
2026年4月7日 15:25
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
PDF文档(打印)
分享
链接
类型
密码
更新密码