textfield_shadow 1.1.0+2
textfield_shadow: ^1.1.0+2 copied to clipboard
Textfield Shadow is for creating attractive textfield with full customization available and also initial textfield with shadow and prefix and suffix with your choice and many functions for apply more [...]
import 'package:flutter/material.dart';
import 'package:textfield_shadow/custom_textfield.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: HomePage(),
);
}
}
class HomePage extends StatelessWidget {
const HomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
final Size size = MediaQuery.of(context).size;
final TextEditingController controller = TextEditingController();
return Scaffold(
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Center(
child: CustomTextfield(
size: size,
controller: controller,
prefixIcon: const Icon(Icons.lock, size: 16, color: Colors.blue),
hintStr: "Password",
suffixIcon: const Icon(Icons.remove_red_eye, size: 22, color: Colors.black),
),
)
],
),
);
}
}