Skip to content

Commit

Permalink
Improved example
Browse files Browse the repository at this point in the history
  • Loading branch information
lamnhan066 committed Jan 8, 2024
1 parent 2ee27a7 commit 76cad96
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,9 @@ class _MyAppState extends State<MyApp> {
}
}

class OtherPage extends StatefulWidget {
class OtherPage extends StatelessWidget {
const OtherPage({Key? key}) : super(key: key);

@override
State<OtherPage> createState() => _OtherPageState();
}

class _OtherPageState extends State<OtherPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
Expand All @@ -121,11 +116,7 @@ class _OtherPageState extends State<OtherPage> {
),
body: Column(
children: [
Tr(
(context) {
return Text('Text will be changed'.tr);
},
),
Tr((_) => Text('Text will be changed'.tr)),
Text('Text will be not changed'.tr),
ElevatedButton(
onPressed: () {
Expand Down

0 comments on commit 76cad96

Please sign in to comment.