flutter_build_mode 1.0.0 copy "flutter_build_mode: ^1.0.0" to clipboard
flutter_build_mode: ^1.0.0 copied to clipboard

discontinued
outdated

Get the build mode of your Flutter app!

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('BuildMode example'),
        ),
        body: Center(
          child: Text('Current build mode is ${_currentBuildMode()}'),
        ),
      ),
    );
  }

  String _currentBuildMode() {
    if (BuildMode.isRelease) {
      return 'Release Mode';
    }
    if (BuildMode.isProfile) {
      return 'Profile Mode';
    }

    return 'Debug Mode';
  }
}
2
likes
0
pub points
35%
popularity

Publisher

verified publisherokaryo.io

Get the build mode of your Flutter app!

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_build_mode