【发布时间】:2021-06-03 05:04:14
【问题描述】:
我目前正在使用 android studio flutter 测试我的原型,我设法在移动设备上成功运行了我的模板,但是模板太大了,我不知道如何使模板更小以适合屏幕
p>当您选择此链接时,您可以看到它的样子:
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32,47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.dark().copyWith(scaffoldBackgroundColor: darkBlue),
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
child: Image.network("https://i.stack.imgur.com/deB5P.png", fit: Boxfit.fill),
)
title: 'Flutter Demo',
// This is the theme of your application.
//
// Try running your application with "flutter run". You'll see the
// application has a blue toolbar. Then, without quitting the app, try
// changing the primarySwatch below to Colors.green and then invoke
// "hot reload" (press "r" in the console where you ran "flutter run",
// or simply save your changes to "hot reload" in a Flutter IDE).
// Notice that the counter didn't reset back to zero; the application
// is not restarted.
primarySwatch: Colors.blue,
),
),
);
} }
【问题讨论】:
标签: flutter android-studio dart mobile