adaptable_screen 0.0.4 copy "adaptable_screen: ^0.0.4" to clipboard
adaptable_screen: ^0.0.4 copied to clipboard

The plug-in scales sizes based on the size of the UIDesign prototypes and the windows the components are being placed into.

example/lib/main.dart

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

void main() {
  AdaptableScreenUtils.init(
    heightUIDisign: 1000,
    widthUIDisign: 956,
  );
  runApp(const MyApp());
}

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

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

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          children: [
            Container(
              decoration: BoxDecoration(
                color: Colors.red,
                borderRadius: BorderRadius.circular(33.r),
              ),
              height: 160.h,
              width: 200.w,
              child: Center(
                child: Text(
                  "Text Exemplo",
                  style: TextStyle(fontSize: 20.ssp),
                ),
              ),
            ),
            Container(
              decoration: BoxDecoration(
                color: Colors.grey,
                borderRadius: BorderRadius.circular(10.r),
              ),
              height: 50.h,
              width: 100.w,
              child: Center(
                child: Text(
                  "Text Exemplo",
                  style: TextStyle(fontSize: 15.sp),
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
8
likes
140
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

The plug-in scales sizes based on the size of the UIDesign prototypes and the windows the components are being placed into.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on adaptable_screen