Download flutter/dev/integration_tests/spell_check/lib/main.dart from luom2645/agent-workspace: direct link, hf CLI and curl.
- Browser
- Download file 1.39 kB
-
https://huggingface.co/luom2645/agent-workspace/resolve/7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/flutter/dev/integration_tests/spell_check/lib/main.dart
- Command line
-
hf download hf://luom2645/agent-workspace@7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/flutter/dev/integration_tests/spell_check/lib/main.dart
-
curl -L -o main.dart https://huggingface.co/luom2645/agent-workspace/resolve/7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/flutter/dev/integration_tests/spell_check/lib/main.dart
1.39 kB
| // Copyright 2014 The Flutter 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}); | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| title: 'Spellcheck Demo', | |
| theme: ThemeData( | |
| primarySwatch: Colors.blue, | |
| ), | |
| home: const MyHomePage(title: 'Spellcheck Demo'), | |
| ); | |
| } | |
| } | |
| class MyHomePage extends StatefulWidget { | |
| const MyHomePage({super.key, required this.title}); | |
| final String title; | |
| State<MyHomePage> createState() => _MyHomePageState(); | |
| } | |
| class _MyHomePageState extends State<MyHomePage> { | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| appBar: AppBar( | |
| title: Text(widget.title), | |
| ), | |
| body: Center( | |
| child: EditableText( | |
| controller: TextEditingController(), | |
| backgroundCursorColor: Colors.grey, | |
| focusNode: FocusNode(), | |
| style: const TextStyle(), | |
| cursorColor: Colors.red, | |
| spellCheckConfiguration: | |
| const SpellCheckConfiguration( | |
| misspelledTextStyle: TextField.materialMisspelledTextStyle, | |
| ) | |
| ) | |
| ), | |
| ); | |
| } | |
| } | |