From 081e8f36d49e91cf6b0fc0517e0ff26e7c5a9f40 Mon Sep 17 00:00:00 2001 From: yingshaoxo Date: Wed, 15 Mar 2023 15:39:16 +0800 Subject: [PATCH] add more info to Random Life page --- .../lib/pages/8.features/random_life_page.dart | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/flutter_client/lib/pages/8.features/random_life_page.dart b/flutter_client/lib/pages/8.features/random_life_page.dart index 53af1cf..09d587a 100644 --- a/flutter_client/lib/pages/8.features/random_life_page.dart +++ b/flutter_client/lib/pages/8.features/random_life_page.dart @@ -4,6 +4,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/src/foundation/key.dart'; import 'package:flutter/src/widgets/framework.dart'; import 'package:flutter/src/widgets/placeholder.dart'; +import 'package:flutter_client/store/controllers.dart'; class RandomLifePage extends StatefulWidget { const RandomLifePage({Key? key}) : super(key: key); @@ -36,6 +37,8 @@ class _RandomLifePageState extends State { var random_index = Random.secure().nextInt(places.length); var random_place = places[random_index]; + var username = variable_controller.userModel.username ?? "yingshaoxo"; + return Padding( padding: const EdgeInsets.symmetric(horizontal: 20), child: Column( @@ -56,7 +59,17 @@ class _RandomLifePageState extends State { Spacer(), Spacer(), Spacer(), - Spacer(), + Text(""" +Hi, ${username} + +今天又是愉快的一天,记住几句话: + +1. 不谈恋爱不结婚 +2. 不打工不受压榨 +3. 练习 普通话 + English +4. 写代码 + 卖东西 +""" + .trim()), Spacer(), Spacer(), Spacer(),