Controlling traversal order

To get more control over the order that widgets are focused on when the user tabs through, you can use FocusTraversalGroup to define sections of the tree that should be treated as a group when tabbing. For example, you might to tab through all the fields in a form before tabbing to the submit button:… Continue reading Controlling traversal order

Published
Categorized as Dart Tagged

Tab traversal and focus interactions

Users with physical keyboards expect that they can use the tab key to quickly navigate an application, and users with motor or vision differences often rely completely on keyboard navigation. There are two considerations for tab interactions: how focus moves from widget to widget, known as traversal, and the visual highlight shown when a widget… Continue reading Tab traversal and focus interactions

Published
Categorized as Dart Tagged

Animate opacity with AnimatedOpacity widget – Set up a trigger for animation and choose an end value

Set up a trigger for animation and choose an end value Configure the animation to trigger when the user clicks Show details. To do this, change opacity state using the onPressed() handler for TextButton. To make the FadeInDemo widget become fully visible when the user clicks Show details, use the onPressed() handler to set opacity… Continue reading Animate opacity with AnimatedOpacity widget – Set up a trigger for animation and choose an end value

Published
Categorized as Dart Tagged

Animate opacity with AnimatedOpacity widget – Pick a widget property to animate

@override Widget build(BuildContext context) {  return ListView(children: <Widget>[   Image.network(owlUrl),   TextButton(    child: const Text(     ‘Show Details’,     style: TextStyle(color: Colors.blueAccent),    ),    onPressed: () => {},   ),   const Column(    children: [     Text(‘Type: Owl’),     Text(‘Age: 39’),     Text(‘Employment: None’),    ],   ),   AnimatedOpacity(    child: const Column(     children: [      Text(‘Type: Owl’),      Text(‘Age: 39’),      Text(‘Employment: None’),     ],    ),   ),  ]); }

Published
Categorized as Dart Tagged

Add permissions to your app

update your android and ios configurations to ensure that your app has the correct permissions to stream videos from the internet. Add the following permission to the AndroidManifest.xml file just after the <application> definition. The AndroidManifest.xml file is found at <project root>/android/app/src/main/AndroidManifest.xml. <manifest xmlns:android=”http://schemas.android.com/apk/res/android”>   <application …>   </application>   <uses-permission android:name=”android.permission.INTERNET”/> </manifest> content_copy iOS For iOS, add… Continue reading Add permissions to your app

Published
Categorized as Dart Tagged

Add the video_player dependency

This recipe depends on one Flutter plugin: video_player. First, add this dependency to your project. To add the video_player package as a dependency, run flutter pub add: $ flutter pub add video_player

Published
Categorized as Dart Tagged

Play and pause a video

playing videos is a common task in app development, and Flutter apps are no exception. To play videos, the Flutter team provides the video_player plugin. You can use the video_player plugin to play videos stored on the file system, as an asset, or from the internet. This recipe demonstrates how to use the video_player package… Continue reading Play and pause a video

Published
Categorized as Dart Tagged

Fade in images with a placeholder

When displaying images using the default Image widget, you might notice they simply pop onto the screen as they’re loaded. This might feel visually jarring to your users. Instead, wouldn’t it be nice to display a placeholder at first, and images would fade in as they’re loaded? Use the FadeInImage widget for exactly this purpose.… Continue reading Fade in images with a placeholder

Published
Categorized as Dart Tagged