質問編集履歴

1

コード全体

2022/06/09 09:30

投稿

rn383
rn383

スコア2

test CHANGED
File without changes
test CHANGED
@@ -10,7 +10,31 @@
10
10
  何が原因でしょうか?同期、非同期について理解できていないためご教示いただけますと幸いです。
11
11
 
12
12
  ```ここに言語を入力
13
+ class Home extends StatelessWidget {
14
+ @override
15
+ Widget build(BuildContext context) {
16
+ return Scaffold(
17
+ body: Center(
18
+ child: Column(
19
+ mainAxisAlignment: MainAxisAlignment.start,
20
+ children: <Widget>[
21
+ Row(mainAxisAlignment: MainAxisAlignment.start, children: <Widget>[
22
+ Container(
23
+ child: Text('メニュー')),
24
+ ]),
25
+ Container(
26
+ child: _buildChild(context),
27
+ ),
28
+ ],
29
+ ),
30
+ ),
31
+ );
32
+ }
33
+
34
+ Widget _buildChild(BuildContext context) {
35
+ String uid = FirebaseAuth.instance.currentUser!.uid;
36
+
13
-  String a = "";
37
+ String a = "";
14
38
 
15
39
  Future<void> future1() async {
16
40
  await FirebaseFirestore.instance
@@ -26,7 +50,48 @@
26
50
  future1();
27
51
 
28
52
  if (a == "aaa") {
53
+ return Column(
54
+ mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
29
-   }
55
+ Container(
56
+ margin: EdgeInsets.only(top: 100),
57
+ alignment: Alignment.center,
30
- else{ //[2]
58
+ child: Text('はじめまして')),
59
+ ]);
31
60
  }
61
+ return Padding( //[2]
62
+ padding: EdgeInsetsDirectional.fromSTEB(0, 20, 0, 0),
63
+ child: Row(
64
+ mainAxisSize: MainAxisSize.max,
65
+ children: [
66
+ Padding(
67
+ padding: EdgeInsetsDirectional.fromSTEB(15, 0, 0, 0),
68
+ child: Container(
69
+ width: 280,
70
+ height: 100,
71
+ child: Column(
72
+ mainAxisSize: MainAxisSize.max,
73
+ children: [
74
+ Container(
75
+ width: 280,
76
+ height: 30,
77
+ child: Padding(
78
+ padding:
79
+ EdgeInsetsDirectional.fromSTEB(0, 4, 0, 0),
80
+ child: Text(
81
+ 'こんにちは',
82
+ textAlign: TextAlign.center,
83
+ ),
84
+ ),
85
+ ),
86
+ ],
87
+ ),
88
+ ),
89
+ ),
90
+ ],
91
+ ),
92
+ );
93
+ }
94
+ }
95
+
96
+
32
97
  ```