1. // main.dart
    2. import 'package:flutter/rendering.dart' show debugPaintSizeEnabled;
    3. // 在main函数中
    4. void main() {
    5. debugPaintSizeEnabled = true;
    6. runApp(MyApp());
    7. }