utils_extensions 0.1.1 copy "utils_extensions: ^0.1.1" to clipboard
utils_extensions: ^0.1.1 copied to clipboard

discontinued

Flutter commonly used utility/helper with implanted function inside data types (Extension), like kotlin & swift extension.

example/lib/main.dart

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

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

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

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);
  final String title;
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        // Example transform string to text widget
        title: widget.title.toText(),
      ),
      // Example transform string to centered text widget
      body:
          'This text is using toTextCentered function from utils_extensions plugin'
              .toTextCentered(style: TextStyle(color: Colors.blue)),
    );
  }
}
7
likes
40
pub points
0%
popularity

Publisher

unverified uploader

Flutter commonly used utility/helper with implanted function inside data types (Extension), like kotlin & swift extension.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, regexpattern

More

Packages that depend on utils_extensions