point_component.dart 613 B

1234567891011121314151617181920212223242526
  1. import 'package:flutter/material.dart';
  2. /// 标记点
  3. class PointComponent extends StatelessWidget {
  4. final double size;
  5. const PointComponent({Key? key, required this.size}) : super(key: key);
  6. @override
  7. Widget build(BuildContext context) {
  8. return SizedBox(
  9. width: size,
  10. height: size,
  11. child: Center(
  12. child: Container(
  13. width: 10,
  14. height: 10,
  15. decoration: const BoxDecoration(
  16. color: Colors.green,
  17. borderRadius: BorderRadius.all(Radius.circular(10)),
  18. ),
  19. ),
  20. ),
  21. );
  22. }
  23. }