-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
44a88c8
commit 11035a0
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class NestingScreen extends StatefulWidget { | ||
const NestingScreen({super.key}); | ||
|
||
@override | ||
State<NestingScreen> createState() => _NestingScreenState(); | ||
} | ||
|
||
class _NestingScreenState extends State<NestingScreen> { | ||
int count = 0; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
const padding = EdgeInsets.symmetric(horizontal: 48, vertical: 64); | ||
|
||
return Scaffold( | ||
appBar: AppBar( | ||
title: const Text('Nesting test screen'), | ||
), | ||
body: Stack( | ||
children: [ | ||
Semantics( | ||
identifier: 'level-0', | ||
child: Container( | ||
padding: padding, | ||
child: Stack( | ||
children: [ | ||
Semantics( | ||
identifier: 'level-1', | ||
child: Container( | ||
color: Colors.blue, | ||
padding: padding, | ||
child: Stack( | ||
children: [ | ||
Semantics( | ||
identifier: 'level-2', | ||
child: Container( | ||
color: Colors.orange, | ||
padding: padding, | ||
), | ||
), | ||
const Text('Container at level 2'), | ||
], | ||
), | ||
), | ||
), | ||
const Text('Container at level 1'), | ||
], | ||
), | ||
), | ||
), | ||
const Text('Container at level 0'), | ||
], | ||
), | ||
); | ||
} | ||
} |