abc
unknown
dart
2 months ago
1.2 kB
4
Indexable
Never
import 'package:flutter/material.dart'; void main(List<String> args) { runApp(const MaterialApp(home: MyApp())); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return Scaffold( floatingActionButton: FloatingActionButton( onPressed: () { showModalBottomSheet( context: context, isScrollControlled: false, builder: (context) => const BottomChangeNamePerson(), ); }, ), ); } } class BottomChangeNamePerson extends StatelessWidget { const BottomChangeNamePerson({super.key}); @override Widget build(BuildContext context) { return Container( padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), child: SingleChildScrollView( child: Column( children: [ const Text( 'Name', style: TextStyle(color: Colors.grey, fontWeight: FontWeight.w600), ), TextFormField( onChanged: (value) {}, style: const TextStyle( color: Colors.black, ), ), ], ), ), ); } }