monzim 0.0.1 copy "monzim: ^0.0.1" to clipboard
monzim: ^0.0.1 copied to clipboard

A personal package helper for flutter.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const HomePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: RType<Color>(
        context,
        defaultValue: Colors.red,
        tablet: Colors.amber,
      ).value,
      body: Center(
        child: RowColumn(
          isRow: DeviceScreen.isTablet(context),
          children: [
            Text(
              DeviceSize.width(context).toString(),
              style: TextStyle(
                fontSize: AType(context,
                        defaultValue: 16,
                        scaleFactor: 3,
                        mobileScaleFactor: 5,
                        tabletScaleFactor: 7)
                    .value,
              ),
            ),
            const Responsive(
              child: Text('Mobile Screen'),
              tablet: Text('Tablet Screen'),
              desktop: Text('Desktop Screen'),
              large: Text('Large Screen'),
            ),
          ],
        ),
      ),
    );
  }
}
1
likes
120
pub points
34%
popularity

Publisher

verified publishermonzim.com

A personal package helper for flutter.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on monzim