mark_component.dart 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter/material.dart';
  3. /// 标记点
  4. class MarkComponent extends StatelessWidget {
  5. final double size;
  6. const MarkComponent({Key? key, required this.size}) : super(key: key);
  7. @override
  8. Widget build(BuildContext context) {
  9. return SizedBox(
  10. width: size,
  11. height: size,
  12. child: Center(
  13. child: Container(
  14. width: 22,
  15. height: 22,
  16. decoration: BoxDecoration(
  17. borderRadius: const BorderRadius.all(Radius.circular(30)),
  18. border: Border.all(
  19. width: 1.0,
  20. color: const Color.fromRGBO(255, 255, 255, .8),
  21. ),
  22. ),
  23. child: Center(
  24. child: Container(
  25. width: 15,
  26. height: 15,
  27. decoration: const BoxDecoration(
  28. color: Color.fromRGBO(255, 255, 255, .8),
  29. borderRadius: BorderRadius.all(Radius.circular(15)),
  30. ),
  31. ),
  32. ),
  33. ),
  34. ),
  35. );
  36. }
  37. }