update label to black and white

This commit is contained in:
2024-01-08 15:14:44 +05:30
parent c67914f286
commit 0b5ce75d6c

View File

@ -105,24 +105,37 @@ class MapWidget extends StatelessWidget {
child: Align( child: Align(
alignment: Alignment.center, alignment: Alignment.center,
child: Container( child: Container(
color: Colors.purple.withOpacity(0.4), color: Colors.purple.withOpacity(0.2),
// child: Text(TextUtils.getDisplayTextFeture(i), // child: Text(TextUtils.getDisplayTextFeture(i),
// style: const TextStyle( // style: const TextStyle(
// fontSize: 16, // fontSize: 16,
// fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
// color: Colors.red, // color: Colors.red,
// ))), // ))),
child: Text( child: Stack(
TextUtils.getDisplayTextFeture(i), children: <Widget>[
style: TextStyle( // Text with white outline
fontSize: 16, Text(
fontWeight: FontWeight.w700, TextUtils.getDisplayTextFeture(i),
// アウトラインの色と幅を設定 style: TextStyle(
foreground: Paint() fontSize: 16,
..style = PaintingStyle.stroke fontWeight: FontWeight.w700,
..strokeWidth = 1 foreground: Paint()
..color = Colors.black, ..style = PaintingStyle.stroke
), ..strokeWidth = 1
..color = Colors.white,
),
),
// Text with black fill
Text(
TextUtils.getDisplayTextFeture(i),
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w700,
color: Colors.black,
),
),
],
)), )),
), ),
) )