better_flutter 1.0.0
better_flutter: ^1.0.0 copied to clipboard
Better Flutter provides custom UI components for building Flutter applications faster and more efficiently than with built-in Flutter widgets.
import 'package:better_flutter/better_text.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Builder(builder: (context) {
return Scaffold(
body: Center(
child: BetterText(
'Hello, {bold world!}\n{red heavy tap underline Click me!}\nI\'m a {cool bold cool text!}',
colors: const {
'cool': Colors.cyan,
},
actions: {
'tap': () {
showDialog(
context: context,
builder: (context) => const AlertDialog(
title: Text('Hello, world!'),
),
);
}
},
textAlign: TextAlign.center,
defaultStyle: const TextStyle(
fontSize: 20,
color: Colors.black,
height: 1.5,
),
),
),
);
}),
);
}
}