浏览代码

Convert to stateless widget

Vishnu Mohandas 4 年之前
父节点
当前提交
cc013a8f9e
共有 1 个文件被更改,包括 1 次插入6 次删除
  1. 1 6
      lib/ui/loading_photos_widget.dart

+ 1 - 6
lib/ui/loading_photos_widget.dart

@@ -1,12 +1,7 @@
 import 'package:flutter/material.dart';
 import 'package:photos/ui/loading_widget.dart';
 
-class LoadingPhotosWidget extends StatefulWidget {
-  @override
-  _LoadingPhotosWidgetState createState() => _LoadingPhotosWidgetState();
-}
-
-class _LoadingPhotosWidgetState extends State<LoadingPhotosWidget> {
+class LoadingPhotosWidget extends StatelessWidget {
   @override
   Widget build(BuildContext context) {
     return Center(