custom_widgets_library 0.0.2
custom_widgets_library: ^0.0.2 copied to clipboard
A Flutter package providing a library of reusable custom widgets.
import 'package:custom_widgets_library/custom_widgets_library.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const ExampleApp());
}
class ExampleApp extends StatelessWidget {
const ExampleApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Custom Widgets Example')),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const CustomTextField(
hintText: 'Enter your username',
prefixIcon: Icons.person,
),
const SizedBox(height: 20),
CustomButton(
text: 'Press Me',
onPressed: () {
//print('Button pressed!');
},
color: Colors.blue,
),
const SizedBox(height: 20),
const CustomCard(
elevation: 4.0,
child: Column(
children: [
Text('Hello from CustomCard!'),
Text('Display any content you want here.'),
],
),
),
],
),
),
),
);
}
}