flutter_screen_adaptation

Last updated:

0 purchases

flutter_screen_adaptation Image
flutter_screen_adaptation Images
Add to Cart

Description:

flutter screen adaptation

Flutter屏幕适配插件 #
用法 #
import 'package:flutter/material.dart';

import 'package:flutter_screen_adaptation/flutter_screen_adaptation.dart';

void main() async {
WidgetsFlutterBinding.ensureInitialized();
await ScreenAdaptation.init(800, 600);
runApp(const MyApp());
}

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

@override
State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

@override
void initState() {
super.initState();
}


@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: Container(width: 400.wdp, height:300.hdp,color: Colors.green,),
),
),
);
}
}

copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.