Skip to content

FLUT-965287 - [Feature] Updated ug pages for treemap widget #1271

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 48 additions & 48 deletions Flutter/treemap/accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,56 +16,56 @@ The [`SfTreemap`](https://pub.dev/documentation/syncfusion_flutter_treemap/lates
{% tabs %}
{% highlight Dart %}

late List<PopulationModel> _source;
late String _semanticLabel = 'Asia is the most populated continent and Australia is the least populated continent';

@override
void initState() {
_source = const <PopulationModel>[
PopulationModel('Asia', 456.07),
PopulationModel('Africa', 121.61),
PopulationModel('Europe', 74.64),
PopulationModel('North America', 57.9),
PopulationModel('South America', 42.25),
PopulationModel('Australia', 2.54),
];
super.initState();
}

@override
void dispose() {
_source.clear();
super.dispose();
}

@override
Widget build(BuildContext context) {
return Scaffold(
body: Semantics(
label: 'Syncfusion Flutter Treemap',
value: _semanticLabel,
child: Column(
children: [
Expanded(
child: SfTreemap(
dataCount: _source.length,
weightValueMapper: (int index) {
return _source[index].populationInCrores;
},
levels: [
TreemapLevel(
groupMapper: (int index) {
return _source[index].continent;
},
),
],
late List<PopulationModel> _source;
late String _semanticLabel = 'Asia is the most populated continent and Australia is the least populated continent';

@override
void initState() {
_source = const <PopulationModel>[
PopulationModel('Asia', 456.07),
PopulationModel('Africa', 121.61),
PopulationModel('Europe', 74.64),
PopulationModel('North America', 57.9),
PopulationModel('South America', 42.25),
PopulationModel('Australia', 2.54),
];
super.initState();
}

@override
void dispose() {
_source.clear();
super.dispose();
}

@override
Widget build(BuildContext context) {
return Scaffold(
body: Semantics(
label: 'Syncfusion Flutter Treemap',
value: _semanticLabel,
child: Column(
children: [
Expanded(
child: SfTreemap(
dataCount: _source.length,
weightValueMapper: (int index) {
return _source[index].populationInCrores;
},
levels: [
TreemapLevel(
groupMapper: (int index) {
return _source[index].continent;
},
),
],
),
),
),
],
],
),
),
),
);
}
);
}

class PopulationModel {
const PopulationModel(this.continent, this.populationInCrores);
Expand Down
Loading