Skip to main content

dartool_flutter 0.1.0 copy "dartool_flutter: ^0.1.0" to clipboard
dartool_flutter: ^0.1.0 copied to clipboard

Flutter extensions for dartool: platform detection, logging, form validation and more.

example/main.dart

import 'package:flutter/foundation.dart';

import 'package:dartool_flutter/dartool_flutter.dart';

void main() {
  PlatformUtil.isWeb;
  PlatformUtil.isAndroid;
  PlatformUtil.isIOS;
  PlatformUtil.isMacOS;
  PlatformUtil.isWindows;
  PlatformUtil.isLinux;
  PlatformUtil.isMobile;
  PlatformUtil.isDesktop;
  PlatformUtil.targetPlatform;

  LogUtil.debug('debug message', tag: 'Example');
  LogUtil.info('info message');
  LogUtil.warn('warn message', tag: 'Example');
  LogUtil.error('error message');

  LogUtil.minLevel = LogLevel.info;
  LogUtil.output = (line) {
    if (kDebugMode) debugPrint('[custom] $line');
  };
}
1
likes
160
points
314
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter extensions for dartool: platform detection, logging, form validation and more.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

dartool, flutter

More

Packages that depend on dartool_flutter