x_constants 0.0.1 copy "x_constants: ^0.0.1" to clipboard
x_constants: ^0.0.1 copied to clipboard

A Flutter package with a conveniently designed common constants for Flutter projects

A Flutter package with a conveniently designed common constants for Flutter projects.

At the moment includes 4 types of constants:

  1. Border
  2. Duration
  3. Padding
  4. Spacing

Features #

x_const

Getting started #

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  x_constants: ^0.0.1

Import it:

import 'package:x_constants/x_constants.dart';

Usage #

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Container(
          decoration: const BoxDecoration(
            borderRadius: XBorder.all16,
            color: Colors.yellow,
          ),
          child: const Padding(
            padding: XPadding.all16,
            child: Text('Text 1'),
          ),
        ),
        XSpacing.vertical16,
        const Padding(
          padding: XPadding.all16,
          child: Text('Text 2'),
        ),
      ],
    );
  }

Additional information #

Feel free to raise a PR, but make sure that new constants are commonly used.

0
likes
140
points
19
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package with a conveniently designed common constants for Flutter projects

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on x_constants