disco_lint 1.0.0 copy "disco_lint: ^1.0.0" to clipboard
disco_lint: ^1.0.0 copied to clipboard

disco_lint is a developer tool for users of disco, designed to help stop common issues and simplify repetitive tasks

example/lib/main.dart

import 'package:disco/disco.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 ProviderScope(
      providers: [],
      child: MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        ),
        home: const MyHomePage(title: 'Flutter Demo Home Page'),
      ),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,

        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: .center,
          children: [
            const Text('You have pushed the button this many times:'),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headlineMedium,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ),
    );
  }
}
2
likes
140
points
86
downloads

Publisher

verified publishermariuti.com

Weekly Downloads

disco_lint is a developer tool for users of disco, designed to help stop common issues and simplify repetitive tasks

Homepage
Repository (GitHub)
View/report issues

Topics

#dependency-injection #scope #provider #linter

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

analysis_server_plugin, analyzer, analyzer_plugin, build, collection, meta, path, source_span, yaml

More

Packages that depend on disco_lint