nb_utils 3.0.2 copy "nb_utils: ^3.0.2" to clipboard
nb_utils: ^3.0.2 copied to clipboard

outdated

This package helps you daily usable function with ease. Just add nb_utils with its latest version and that's it you are ready to use.

example/lib/main.dart

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

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();

    // Subscribe to a channel
    LiveStream liveStream = LiveStream();
    liveStream.on('test_stream', (value) {
      // Do something with received value
    });
  }

  @override
  Widget build(BuildContext context) {
    //
    launchNewScreen(context, 'tag');
    launchNewScreenWithNewTask(context, 'tag');
    finish(context);
    Color color = getColorFromHex('#FFFFF');

    return MaterialApp(
      title: 'Flutter Utils Example',
      theme: ThemeData(
        primarySwatch: whiteColor,
      ),
      home: HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  void initState() {
    super.initState();

    // Send anything to a channel
    LiveStream liveStream = LiveStream();
    liveStream.emit('test_stream', 'Second Page');
  }

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () {
        HomePage().launch(context);
      },
      child: Container(
        child: Column(
          children: <Widget>[
            Text('Simple Text').withStyle(),
            createRichText([
              TextSpan(text: 'fff'),
              TextSpan(text: 'fe'),
            ]),
          ],
        ),
      ),
    );
  }
}
428
likes
0
pub points
99%
popularity

Publisher

verified publisherbhoominn.com

This package helps you daily usable function with ease. Just add nb_utils with its latest version and that's it you are ready to use.

Homepage

License

unknown (license)

Dependencies

connectivity, flutter, fluttertoast, shared_preferences

More

Packages that depend on nb_utils