ns_utils 0.0.4

Flutter Android iOS web

Set of methods/extentions for flutter that makes using framework in a much easier and clean way also adds additional functionality.

example/main.dart

import 'package:flutter/material.dart';
import 'package:ns_utils/src.dart';
import 'package:ns_utils/widgets/custom_error_widget.dart';

void main() {
  //<editor-fold desc="Override ErrorWidget">
  ErrorWidget.builder = (FlutterErrorDetails errorDetails) {
    return CustomErrorWidget(
      errorDetails: errorDetails,
      logoAsset: '<Your app logo asset>',
      showErrorDetails: true, //this should be set to false in production
      onRestart: (BuildContext context) {
        context.makeFirst(HomeScreen());
      },
    );
  };
  //</editor-fold>

  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: HomeScreen(),
    );
  }
}

class HomeScreen extends StatefulWidget {
  @override
  _HomeScreenState createState() => _HomeScreenState();
}

class _HomeScreenState extends State<HomeScreen> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Placeholder(),
    );
  }
}
6
likes
100
pub points
74%
popularity

Publisher

dart.nonstopio.com

Set of methods/extentions for flutter that makes using framework in a much easier and clean way also adds additional functionality.

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

MIT (LICENSE)

Dependencies

crossplat_objectid, flutter, flutter_screenutil, intl, shared_preferences

More

Packages that depend on ns_utils