ns_utils 1.0.0-nullsafety copy "ns_utils: ^1.0.0-nullsafety" to clipboard
ns_utils: ^1.0.0-nullsafety copied to clipboard

outdated

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(),
    );
  }
}
19
likes
0
pub points
42%
popularity

Publisher

verified publisherdart.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

License

unknown (license)

Dependencies

after_layout, cached_network_image, device_info, flutter, flutter_screenutil, flutter_spinkit, flutter_statusbarcolor_ns, intl, package_info, recase, shared_preferences

More

Packages that depend on ns_utils