Skip to main content

code_faster 0.0.6+1 copy "code_faster: ^0.0.6+1" to clipboard
code_faster: ^0.0.6+1 copied to clipboard

discontinued
outdated

This library helps speed up coding and looks cleaner in most cases.

example/lib/main.dart

import 'const.dart';
import 'package:flutter/material.dart';
import 'package:code_faster/code_faster.dart';

void main() {
  runApp(MyApp());
}

const List<dynamic> mainStyle = [mainColor, bold];

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key key, this.title}) : super(key: key);
  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;
  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
              style: makeStyle([mainStyle, 11]),
            ),
            Text(
              'You have pushed the button this many times:',
            ).withs([bold, mainColor, 18]),
            24.height,
            Text(
              '$_counter',
              style:
                  Theme.of(context).textTheme.headline.withs([16, mainColor]),
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ),
    );
  }
}
2
likes
0
points
20
downloads

Publisher

unverified uploader

Weekly Downloads

This library helps speed up coding and looks cleaner in most cases.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on code_faster