在web上,我使用文章this css来设计我的内容的第一段。
p:first-of-type {font-weight: 600;}如何在颤振上制作相同的?
谢谢你的帮助
发布于 2021-09-21 16:25:25
您可以通过多种不同的方式实现用例--其中之一
import 'package:flutter/material.dart';
class Example extends StatelessWidget {
  final values = ['Apple', "Ball", "Cat"];
  @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: Scaffold(
        body: Column(
          children: [
            for (var index = 0; index < values.length; index++)
              if (index == 0)
                Text(
                  values[index],
                  style: TextStyle(fontWeight: FontWeight.w600),
                )
              else
                Text(values[index])
          ],
        ),
      ),
    );
  }
}https://stackoverflow.com/questions/69268152
复制相似问题