md_utils 0.0.1 md_utils: ^0.0.1 copied to clipboard
A collection of customizable Flutter widgets, including enhanced text, buttons, and image components designed to simplify UI development.
import 'package:flutter/material.dart';
import 'package:md_utils/md_utils.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'My Widgets Package Example',
theme: ThemeData(primarySwatch: Colors.blue),
home: Scaffold(
appBar: AppBar(title: Text('My Widgets Example')),
body: Center(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Using the custom MdText widget
const MdText(
text: "Hello, World!",
fontSize: 24,
color: Colors.blue,
fontWeight: FontWeight.bold,
selectable: false,
),
const SizedBox(height: 20),
MdButton(
onTap: () {
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: MdText(
text: "MdButton was pressed!",
)));
},
title: 'Click Me'),
// Using the custom MdButton widget
],
),
),
),
),
);
}
}