design_system_lints 0.1.3 copy "design_system_lints: ^0.1.3" to clipboard
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.

example/lib/main.dart

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;
}
8
likes
100
pub points
7%
popularity

Publisher

unverified uploader

A collection of lints and code edits to enforce UI standards within a codebase. Built with Sidecar.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

analyzer, sidecar, source_gen

More

Packages that depend on design_system_lints