tango 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 46

tango #

Flutter build configuration tool to inject icons, launch images, files, code and more.

Install #

pub global activete tango

Getting Started #

In your flutter project create tango json configuration file.

The basic values in the configuration file are: *copied - Map of desitination location to source location *scaledImages - Map of desitination location to source location, supported formats 'png, jpeg'

Icon and launch image configurations: iosConfig ⋅⋅iconImage ⋅⋅launchImage androidConfig ⋅⋅iconImage ⋅⋅launchImage macConfig ⋅⋅iconImage

##Usage

In your flutter project

>tango -s <source_path> <config_name.json>

There are many ways you can setup your project to take advantage of tango. For example:

>tango -s ./variants/halloween_theme base_app.json free_app.json dev_options.json
>tango -s ./variants/chistmas_theme base_app.json paid_app prod_options.json

0.1.0 #

  • Initial release

example/lib/main.dart

import 'package:flutter/material.dart';

import 'constants.dart';

final constants = AppConstants();

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: constants.theme,
      home: MyHomePage(title: constants.title),
    );
  }
}

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

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

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

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

  void _incrementCounter() {
    setState(() {
      // This call to setState tells the Flutter framework that something has
      // changed in this State, which causes it to rerun the build method below
      // so that the display can reflect the updated values. If we changed
      // _counter without calling setState(), then the build method would not be
      // called again, and so nothing would appear to happen.
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Scaffold(
      appBar: AppBar(
        // Here we take the value from the MyHomePage object that was created by
        // the App.build method, and use it to set our appbar title.
        title: Text(widget.title),
      ),
      body: Center(
        // Center is a layout widget. It takes a single child and positions it
        // in the middle of the parent.
        child: Column(
          // Column is also a layout widget. It takes a list of children and
          // arranges them vertically. By default, it sizes itself to fit its
          // children horizontally, and tries to be as tall as its parent.
          //
          // Invoke "debug painting" (press "p" in the console, choose the
          // "Toggle Debug Paint" action from the Flutter Inspector in Android
          // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
          // to see the wireframe for each widget.
          //
          // Column has various properties to control how it sizes itself and
          // how it positions its children. Here we use mainAxisAlignment to
          // center the children vertically; the main axis here is the vertical
          // axis because Columns are vertical (the cross axis would be
          // horizontal).
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.display1,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  tango: ^0.1.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:tango/tango.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
46
Learn more about scoring.

We analyzed this package on Jun 12, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.9+1

Analysis suggestions

Package not compatible with runtime flutter-web of web

Because of the import of dart:io via the import chain package:tango/tango.dart->package:tango/scale_images.dart->dart:io

Package not compatible with runtime web

Because of the import of dart:io via the import chain package:tango/tango.dart->package:tango/scale_images.dart->dart:io

Health issues and suggestions

Document public APIs. (-1 points)

45 out of 45 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/copy_files.dart.

Run dartfmt to format lib/copy_files.dart.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
args ^1.5.2 1.6.0
image ^2.1.12 2.1.13
yaml ^2.2.0 2.2.1
Transitive dependencies
archive 2.0.13
charcode 1.1.3
collection 1.14.12
convert 2.1.1
crypto 2.1.5
meta 1.1.8
path 1.7.0
petitparser 3.0.4
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
xml 3.7.0 4.2.0
Dev dependencies
mockito ^4.1.1
pedantic ^1.9.0
test ^1.6.0