general_utilities 0.0.4+3

  • Readme
  • Changelog
  • Example
  • Installing
  • new65

general_utilities #

A set of general tools needed by any flutter project, shared to avoid boilerplate code.

Package contains #

Data loading widget #

Showing a CircularProgressIndicator with theme secondary color, with title below.

Widget with body it can be Scrolling part and footer it can be a static button.

No Data Widget #

It can be useful when you need to show a state with image to the user

Restart Widget #

It can be useful when you need to apply a new config on your app, for example I used this widget into toggle app language.

Widget Route Animation #

Use Navigator.push with passing this widget and pass a custom animation.

Widget Animation #

I used this widget with ListView to apply a beautiful looking on list items.

Utilities.showSnackBar #

Workaround to show snackBar without need to Scaffold.

Feel free to contribute and share useful widgets that prevent repetitive tasks. #

[0.0.1] Initial Release #

  • This package contains a set of General utilities that I'm using usually in my projects.

  • I will keep updating this package with this kind of utilities.

  • you're more than welcome to contribute.

[0.0.2] Second Release #

  • Adding example project

  • Adding showSnackBar function

[0.0.3] Third release #

  • Improve snackbar to prevent it from drag-down or dismiss by user

[0.0.4] Release no. 4 #

  • Adding Vertical and Horizontal space widgets to easily add spaces between widgets with customized sizes.

[0.0.4+1] Release no.o 4.1 #

  • fixing issue of svg dependency.

[0.0.4+2] Release no. 4.2 #

  • Set flutter version constraints.

##[0.0.4+3] Release no. 4.3

  • Remove Flutter_SVG dependency.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:general_utilities/general_utilities.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'General Utilities',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('General Utilities'),
      ),
      body: FooterLayout(
        body: NoDataWidget(title: 'No data found', asset: 'assets/images/Icon-512.png'),
        footer: Container(
          color: Colors.grey[100],
          height: 60.0,
          child: Center(
              child: RaisedButton(
            onPressed: () =>
                Utilities.showSnackBar(context, 'Snackbar widget !'),
            child: Text('Show snackbar!'),
          )),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  general_utilities: ^0.0.4+3

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support 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:general_utilities/general_utilities.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
36
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
87
Overall:
Weighted score of the above. [more]
65
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

Because:

  • general_utilities that is a package requiring null.

Health suggestions

Format lib/src/horizontal_space_widget.dart.

Run flutter format to format lib/src/horizontal_space_widget.dart.

Format lib/src/vertical_space_widget.dart.

Run flutter format to format lib/src/vertical_space_widget.dart.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

The package description is too short. (-3 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
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test