custom_edittext 0.0.4 copy "custom_edittext: ^0.0.4" to clipboard
custom_edittext: ^0.0.4 copied to clipboard

A new Flutter package with a highly customizable edittext, can able to set margins without wrapping it in a container and more.

example/lib/main.dart

import 'package:custom_edittext/custom_edittext.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Custom Edittext',
      home: MyHomePage(title: 'Custom Edittext Demo Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);
  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final textEditingController = TextEditingController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
          child: CustomEditText(
        marginLeft: 10,
        marginRight: 10,
        marginTop: 10,
        cornerRadius: 10,
        hintText: "please enter the value",
        borderColor: Colors.red,
        borderWidth: 2,
        isBackgroundFilled: false,
        textAlign: TextAlign.left,
        textStyle: GoogleFonts.lato(fontSize: 18, fontStyle: FontStyle.italic),
        textInputType: TextInputType.name,
        backgroundColor: Colors.blue,
        textEditController: textEditingController,
        maxLines: null,
      )),
    );
  }
}
1
likes
120
points
39
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter package with a highly customizable edittext, can able to set margins without wrapping it in a container and more.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

flutter, google_fonts

More

Packages that depend on custom_edittext