Skip to content

Commit 7835283

Browse files
committed
refactor: rename opacity indicator
1 parent 34b60bf commit 7835283

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

example/lib/main.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import 'package:example/screens/programmatically_controlled_indicator_screen.dar
55
import 'package:example/widgets/web_frame.dart';
66
import 'package:flutter/material.dart';
77

8-
import 'screens/example_indicator_screen.dart';
8+
import 'screens/opacity_indicator_screen.dart';
99
import 'screens/fetch_more_screen.dart';
1010
import 'screens/ice_cream_indicator_screen.dart';
1111
import 'screens/plane_indicator_screen.dart';
@@ -29,7 +29,7 @@ class MyApp extends StatelessWidget {
2929
home: const MainScreen(),
3030
builder: (context, child) => WebFrame(child: child),
3131
routes: {
32-
'/example': (context) => const ExampleIndicatorScreen(),
32+
'/example': (context) => const OpacityIndicatorScreen(),
3333
'/plane': (context) => const PlaneIndicatorScreen(),
3434
'/ice-cream': (context) => const IceCreamIndicatorScreen(),
3535
'/presentation': (context) => const PresentationScreen(),
@@ -38,7 +38,8 @@ class MyApp extends StatelessWidget {
3838
'/envelope': (context) => const EnvelopIndicatorScreen(),
3939
'/fetch-more': (context) => const FetchMoreScreen(),
4040
'/horizontal': (context) => const HorizontalScreen(),
41-
'/programmatically-controlled': (context) => const ProgrammaticallyControlled(),
41+
'/programmatically-controlled': (context) =>
42+
const ProgrammaticallyControlled(),
4243
},
4344
);
4445
}
@@ -85,7 +86,8 @@ class MainScreen extends StatelessWidget {
8586
child: Container(
8687
height: 50,
8788
alignment: Alignment.center,
88-
child: const Text("Custom material indicator with list opacity"),
89+
child:
90+
const Text("Custom material indicator with list opacity"),
8991
),
9092
onPressed: () => Navigator.pushNamed(
9193
context,

example/lib/screens/example_indicator_screen.dart renamed to example/lib/screens/opacity_indicator_screen.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import 'package:example/widgets/example_app_bar.dart';
33
import 'package:example/widgets/example_list.dart';
44
import 'package:flutter/material.dart';
55

6-
class ExampleIndicatorScreen extends StatelessWidget {
7-
const ExampleIndicatorScreen({super.key});
6+
class OpacityIndicatorScreen extends StatelessWidget {
7+
const OpacityIndicatorScreen({super.key});
88

99
@override
1010
Widget build(BuildContext context) {
@@ -23,7 +23,8 @@ class ExampleIndicatorScreen extends StatelessWidget {
2323
},
2424
scrollableBuilder: (context, child, controller) {
2525
return FadeTransition(
26-
opacity: Tween(begin: 1.0, end: 0.0).animate(controller.clamp(0.0, 1.0)),
26+
opacity: Tween(begin: 1.0, end: 0.0)
27+
.animate(controller.clamp(0.0, 1.0)),
2728
child: child,
2829
);
2930
},

0 commit comments

Comments
 (0)