gocaptcha 0.0.1+5
gocaptcha: ^0.0.1+5 copied to clipboard
A flutter widget for gocaptcha where github repo is "gocaptcha:https://github.com/wenlng/go-captcha"
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:gocaptcha_example/home_page.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
//默认系统语言
locale: PlatformDispatcher.instance.locale,
//支持的语言
supportedLocales: const [
Locale('en', 'US'), // 英文
Locale('zh', 'CN'), // 中文
],
// 添加 Flutter 内置的本地化代理
localizationsDelegates: const [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
home: HomePage(),
);
}
}