flutter_readable 1.0.0 flutter_readable: ^1.0.0 copied to clipboard
extensions and helpers for dart to save time , make the code more readable and smaller
import 'package:flutter/material.dart';
import 'package:flutter_readable/flutter_readable.dart';
void main() => runApp(MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const MyHomePage()));
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key});
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: context.colorScheme.inversePrimary,
title: Text('Flutter Readable'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <String, String>{
'context.directionality': context.directionality.toString(),
'context.locale': context.locale.toString(),
'context.isLtr': context.isLtr.toString(),
'context.isRtl': context.isRtl.toString(),
}
.entries
.map(
(e) => Card(
child: ListTile(
title: Text(e.key),
subtitle: Text(e.value),
),
),
)
.toList(),
),
),
);
}
}