flutter_adaptive_text 1.0.0
flutter_adaptive_text: ^1.0.0 copied to clipboard
Automatically picks a legible text color (black, white, or any palette color) based on the background color. WCAG 2.1 AA/AAA + APCA support. Drop-in AdaptiveText widget, Color extension, and standalon [...]
import 'package:flutter/material.dart';
import 'screens/home_screen.dart';
void main() => runApp(const AdaptiveTextExampleApp());
class AdaptiveTextExampleApp extends StatelessWidget {
const AdaptiveTextExampleApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'flutter_adaptive_text Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
useMaterial3: true,
colorSchemeSeed: Colors.deepPurple,
scaffoldBackgroundColor: const Color(0xFF0A0A0F),
),
home: const HomeScreen(),
);
}
}