base_lib_pub 2.9.1 copy "base_lib_pub: ^2.9.1" to clipboard
base_lib_pub: ^2.9.1 copied to clipboard

This is a basic library based on Getx. In order to build applications conveniently and quickly, you can quickly integrate the basic functions needed by general applications.

example/lib/main.dart

import 'package:base_lib_pub/base_lib_pub.dart';
import 'package:base_lib_pub_example/route/routes.dart';
import 'package:base_lib_pub_example/translation/translation.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

void main() {
  runMyApp(
    const MyApp(),
    enableLog: true,
    unPopRoutes: [Routes.init, Routes.home],
    initWeChat: true,
    beforeRun: () async {
      /// 初始化网络请求
      initDio(ignoreCertificate: true);
    },
  );
}

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      // 路由
      initialRoute: Routes.init,
      getPages: Routes.getPages(),
      // 国际化配置
      locale: MyTranslations.locale,
      fallbackLocale: MyTranslations.fallbackLocale,
      translations: MyTranslations(),
      // botToast
      builder: toastBuilder,
      navigatorObservers: [toastObserver],
    );
  }
}
4
likes
130
points
546
downloads

Publisher

verified publisherhomedot.space

Weekly Downloads

This is a basic library based on Getx. In order to build applications conveniently and quickly, you can quickly integrate the basic functions needed by general applications.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

bot_toast, date_format, device_info_plus, dio, encrypt, extended_image, flutter, flutter_image_compress, flutter_slidable, get, harmony_plugin, image_gallery_saver, package_info_plus, path, path_provider, permission_handler, share_plus, shared_preferences, simple_animations, uri_to_file, url_launcher, webview_flutter, wechat_assets_picker, wechat_camera_picker

More

Packages that depend on base_lib_pub