semanatic application in flutter

import 'package:flutter/material.dart';import 'package:cached_network_image/cached_network_image.dart';import 'package:flutter_semantics_demo/themes/device_size.dart';class SemanticsWidgetDemo extends StatefulWidget {  @override  _SemanticsWidgetDemoState createState() => _SemanticsWidgetDemoState();}class _SemanticsWidgetDemoState extends State<SemanticsWidgetDemo> {  @override  Widget build(BuildContext context) {    return Scaffold(      appBar: AppBar(        title: Text('Semantics Widget Demo'),      ),      body: Container(        height: DeviceSize.height(context),        width: DeviceSize.width(context),        child: Column(          mainAxisAlignment: MainAxisAlignment.spaceAround,          children: [            Column(              children: [                Text(                  'Semantics Widget',                  style: TextStyle(fontSize: 17, fontWeight: FontWeight.w600),                ),                SizedBox(                  height: 20,                ),                Semantics(                  child: ClipOval(                    child: CircleAvatar(                      maxRadius: 70,                      child: CachedNetworkImage(                        imageUrl: 'https://picsum.photos/250?image=9',                        height: DeviceSize.height(context),                        width: DeviceSize.width(context),                        fit: BoxFit.cover,                      ),                    ),                  ),                  label: 'Company logo',                ),              ],            ),            Column(              children: [                Text(                  'MergeSemantics',                  style: TextStyle(fontSize: 17, fontWeight: FontWeight.w600),                ),                SizedBox(                  height: 20,                ),                MergeSemantics(                  child: Column(                    mainAxisAlignment: MainAxisAlignment.spaceEvenly,                    children: <Widget>[                      ListTile(                        leading:                            Icon(Icons.account_circle, semanticLabel: 'name'),                        title: Text(                          "John Doe",                          style: TextStyle(color: Colors.blue),                        ),                        onTap: () {},                      ),                      ListTile(                        leading: Icon(                          Icons.email,                          semanticLabel: 'email',                        ),                        title: Text(                          "[email protected]",                          style: TextStyle(color: Colors.blue),                        ),                        onTap: () {},                      ),                      ListTile(                        leading:                            Icon(Icons.business, semanticLabel: 'company name'),                        title: Text(                          "ABC Inc.",                          style: TextStyle(color: Colors.blue),                        ),                        onTap: () {},                      ),                    ],                  ),                ),              ],            ),          ],        ),      ),    );  }}

Are there any code examples left?
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source