textfield_controller 1.0.0+1 copy "textfield_controller: ^1.0.0+1" to clipboard
textfield_controller: ^1.0.0+1 copied to clipboard

A new Flutter controller for textfield.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:textfield_controller/textfield_controller.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(

        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home:  HomePage()
    );
  }
}

class HomePage extends StatefulWidget {
  const HomePage({super.key});

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
   return Scaffold(
      appBar: AppBar(title: Text('Custom TextField Example')),
      body: Padding(
        padding: const EdgeInsets.all(16.0),
        child: Column(
          children: [
            CustomTextField(
              controller: TextEditingController(),
              label: 'Username',
              hintText: 'Enter your username',
              obscureText: false,
              keyboardType: TextInputType.text,
              width: double.infinity,
            ),
          ],
        ),
      ),
    );
  }
}
0
likes
140
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter controller for textfield.

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

cupertino_icons, flutter

More

Packages that depend on textfield_controller