我尝试在很多资源中查找,但不幸的是我找不到将文本垂直居中对齐的方法。我也尝试使用 suffixIcon 而不是 suffix 但仍然没有运气。这是我的代码:
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: HomePage(),
);
}
}
class HomePage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _HomePageState();
}
}
class _HomePageState extends State<HomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
leading: Icon(
Icons.menu,
color: Colors.black,
),
backgroundColor: Colors.white,
title: Container(
margin: EdgeInsets.only(bottom: 10),
child: Image.asset(
"icons/logo.png",
),
),
bottom: PreferredSize(
child: Padding(
padding: EdgeInsets.only(
left: …Run Code Online (Sandbox Code Playgroud) 许多人提出了这个问题,但他们的问题是通过使用此处显示的两种方法之一解决的:Flutter iOS build failure error with Multiple commands after the Xcode upgrade
但是,两者都不能解决我的问题。
错误 :
Launching lib/main.dart on iPhone X? in debug mode...
Running pod install...
Running Xcode build...
Xcode build done. 5.2s
Failed to build iOS app
Error output from Xcode build:
?
** BUILD FAILED **
Xcode's output:
?
error: Multiple commands produce '/Users/femindharamshi/Downloads/RotiBankProject-Master(Build excluded)/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework':
1) Target 'Runner' has copy command from '/Users/femindharamshi/Downloads/RotiBankProject-Master(Build excluded)/ios/Flutter/Flutter.framework' to '/Users/femindharamshi/Downloads/RotiBankProject-Master(Build excluded)/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework'
2) That command depends on command in Target 'Runner': script …Run Code Online (Sandbox Code Playgroud)