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

LazyUi is a collection of widgets and utilities designed to simplify and speed up the app development process with Flutter. Simplifying Flutter development for those who prefer efficiency. Fewer lines [...]

example/lib/main.dart

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

import 'pages/page.dart';
import 'theme/theme.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();

  LazyUi.config(
      radius: 5,
      primaryColor: LzColors.dark,
      theme: AppTheme.light,
      textStyle: GoogleFonts.nunito(fontSize: 15.5),
      iconType: IconType.tablerIcon,
      widgets: () {
        LzConfirm.config(cancel: 'Cancel', confirm: 'Yes!');
        LzToast.config(position: Position.center);
        // LzImage.config(errorWidget: <your widget here>);

        Errors.config(
            botToken: '<bot_token>',
            chatId: '<chat_id>',
            useBot: true,
            errorBuilder: (ErrorInfo info) {
              String message =
                  'This is custom error message: ${info.error}, ${info.device}';
              Bot.sendMessage(message, info.botToken!, info.chatId!);
            });
      });

  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "LazyUi",
      theme: appTheme,
      home: const HomePage(),
      builder: (BuildContext context, Widget? widget) {
        double fontDeviceSize = MediaQuery.of(context).textScaleFactor;

        // prevent user from scaling font size
        return MediaQuery(
            data: MediaQuery.of(context).copyWith(
              textScaleFactor: fontDeviceSize > 1.1 ? 1.1 : 1.0,
            ),
            child: LzToastOverlay(child: widget));
      },
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return const Scaffold(
      body: AppIntro2(),
    );
  }
}
6
likes
0
points
1.18k
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. Simplifying Flutter development for those who prefer efficiency. Fewer lines, cleaner code, quicker results. The essential tool for the streamlined developer.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

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

More

Packages that depend on lazyui