design_system_lints 0.1.3 design_system_lints: ^0.1.3 copied to clipboard
A collection of lints and code edits to enforce UI standards within a codebase. Built with Sidecar.
import 'package:design_system_annotations/design_system_annotations.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
// Lints will appear over new creations of theme
theme: ThemeData(
// accentColor: Colors.black,
// accentTextTheme: ,
// primaryTextTheme: ,
extensions: []),
);
}
}
class DesignApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
// final randomColor = Colors.blue;
return MaterialApp(
theme: MyCustomTheme.light.copyWith(
primaryColor: Colors.blue[400],
),
color: Colors.red.shade100,
);
// return WidgetsApp();
}
}
@designSystem
class MyCustomTheme {
static final light = ThemeData(
primaryColor: primary,
hoverColor: white,
);
static final customTextStyle = light.textTheme.headlineLarge?.copyWith(
color: primary,
);
static const primary = Colors.blue;
static const white = Colors.white;
}