小编The*_*299的帖子

在 TextField Flutter 中垂直居中对齐文本

我尝试在很多资源中查找,但不幸的是我找不到将文本垂直居中对齐的方法。我也尝试使用 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)

text vertical-alignment textfield flutter

13
推荐指数
7
解决办法
3万
查看次数

Flutter iOS 构建失败,多个命令产生错误

许多人提出了这个问题,但他们的问题是通过使用此处显示的两种方法之一解决的: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)

xcode ios flutter

6
推荐指数
1
解决办法
1035
查看次数

标签 统计

flutter ×2

ios ×1

text ×1

textfield ×1

vertical-alignment ×1

xcode ×1