qbs 0.1.2 copy "qbs: ^0.1.2" to clipboard
qbs: ^0.1.2 copied to clipboard

A command-line tool to switch between different configurations defined in a YAML file. This tool allows you to easily toggle between development, staging, production, or any custom environments using [...]

example/lib/main.dart

import 'package:flutter/material.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(title),
      ),
      body: const Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            //@if(prod)
            // Text(
            // 'Welcome to the production version!',
            // ),
            //@endif(prod)

            //@if(dev)
            Text(
              'Welcome to the development version!',
            ),
            //@endif(dev)
          ],
        ),
      ),
    );
  }
}
4
likes
140
points
12
downloads

Publisher

verified publisherdevmuaz.com

Weekly Downloads

A command-line tool to switch between different configurations defined in a YAML file. This tool allows you to easily toggle between development, staging, production, or any custom environments using simple annotations in your code.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

args, yaml

More

Packages that depend on qbs