What do you want to save?
Add Code snippet
New code examples in category Dart
-
GreenHannah 2021-09-10 15:36:02
get current line number dart flutter
int get lineNumber { try { final re = RegExp(r'^#1[ \t]+.+:(?<line>[0-9]+):[0-9]+\)$', multiLine: true); final match = re.firstMatch(StackTrace.current.toString()); return (match == null) ? -1 : int.parse(match.namedG... Add solution -
Mauricio Pasquier Juan 2021-09-10 15:02:04
flutter trigger show off keyboard
class _HomeState extends State<Home> { var currentFocus; unfocus() { currentFocus = FocusScope.of(context); if (!currentFocus.hasPrimaryFocus) { currentFocus.unfocus(); } } Widget build(BuildContext context) { retu... Add solution -
Jai N Prakash 2021-09-10 14:17:03
android studio test dart code
// Online: https://dartpad.dartlang.org/?null_safety=true // In Android Studio: In the files listbox (toolbar, name of file, 'main.dart' for ex), select: > Edit configurations... > + > Dart Command Line App Add your Dart file (my_project... Add solution -
George Parker 2021-09-10 03:21:04
dart httop client
import 'package:http/http.dart' as http; var url = 'https://example.com/whatsit/create'; var response = await http.post(url, body: {'name': 'doodle', 'color': 'blue'}); print('Response status: ${response.statusCode}'); print('Response body: ${response.bo... Add solution