lazyui 4.2.2 copy "lazyui: ^4.2.2" to clipboard
lazyui: ^4.2.2 copied to clipboard

LazyUi is a collection of widgets and utilities designed to simplify and speed up the app development process with Flutter.

example/lib/main.dart

import 'package:animated_theme_switcher/animated_theme_switcher.dart';
import 'package:example/app/modules/home/views/home_view.dart';
import 'package:flutter/material.dart';
import 'package:lazyui/lazyui.dart';

void errorHandler(ErrorInfo info) {
  String error = info.error;

  if (error.contains("is not a subtype of type")) {
    final match = RegExp(r"type '(.*?)' is not a subtype of type '(.*?)'")
        .firstMatch(error);

    if (match != null) {
      final from = match.group(2);
      final to = match.group(1);
      String message =
          'There is a change in data type from \'$from\' to \'$to\'';

      if (info.frames.isNotEmpty) {
        error = '$message, file: ${info.frames.first}';
      }
    }
  }

  // errors
  List<String> errorList = [
    error,
    '',
    '<b>App, User & Device</b>',
    'LazyUI, v1.0.0 24.12.02.1',
  ];

  String message = errorList.join('\n');
  logg(message);
}

void main() async {
  // initialize lazyui
  LazyUi.init(locale: 'id_ID', icon: IconType.huge);

  Errors.config(
      botToken: 'a',
      chatId: 'a',
      useBot: true,
      errorBuilder: (info) {
        errorHandler(info);
      });

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return ThemeProvider(
      initTheme: LzTheme.light,
      builder: (context, theme) {
        return MaterialApp(
          theme: theme,
          title: 'LazyUi',
          home: const HomeView(),
          builder: LazyUi.builder,
        );
      },
    );
  }
}
6
likes
150
points
609
downloads

Publisher

unverified uploader

Weekly Downloads

LazyUi is a collection of widgets and utilities designed to simplify and speed up the app development process with Flutter.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

ansicolor, cached_network_image, custom_refresh_indicator, device_info_plus, flutter, flutter_svg, google_fonts, http, intl, path_provider, stack_trace, teledart, tutorial_coach_mark

More

Packages that depend on lazyui