【问题标题】:Expected a class member. :19期望一个班级成员。 :19
【发布时间】:2021-11-09 14:14:11
【问题描述】:
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';



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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      bottomSheet: const Text(
        'Hello',
      ),
      appBar: AppBar(),
        title: const Text(
        'Hello',
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children:
          [
            Row(
              children:
              [
                Column(
                  mainAxisSize: MainAxisSize.max,
                  mainAxisAlignment: MainAxisAlignment.center,
                  children:
                  const [
                   Text(
                     'Hello AbdelAzim',
                     style: TextStyle(
                       fontWeight: FontWeight.bold,
                       fontSize: 30,
                     ),
                   ),

                  ],
                ),
              ],
            ),
          ],
        ),
      ),

      );
  }
}

【问题讨论】:

  • 欢迎来到 SO。请提供完整的错误消息,并在问题正文中提供有关您遇到的问题的更多详细信息

标签: flutter android-studio dart


【解决方案1】:

只需像下面这样更改您的 appBar,希望对您有所帮助,然后运行您的应用

appBar: AppBar( 
       title:  Text('Hello', ),
     ),

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-09-11
    • 1970-01-01
    • 2011-08-09
    • 1970-01-01
    • 1970-01-01
    • 2012-01-15
    • 2014-11-19
    相关资源
    最近更新 更多