text stringlengths 1 372 |
|---|
return MouseRegion( |
onEnter: (_) => setState(() => _isMouseOver = true), |
onExit: (_) => setState(() => _isMouseOver = false), |
onHover: (e) => print(e.localPosition), |
child: container( |
height: 500, |
color: _isMouseOver ? colors.blue : colors.black, |
), |
); |
<code_end> |
<topic_end> |
<topic_start> |
idioms and norms |
the final area to consider for adaptive apps is platform standards. |
each platform has its own idioms and norms; |
these nominal or de facto standards inform user expectations |
of how an application should behave. thanks, in part to the web, |
users are accustomed to more customized experiences, |
but reflecting these platform standards can still provide |
significant benefits: |
reduce cognitive load—By matching the user’s |
existing mental model, accomplishing tasks becomes intuitive, |
which requires less thinking, |
boosts productivity, and reduces frustrations. |
build trust—Users can become wary or suspicious |
when applications don’t adhere to their expectations. |
conversely, a UI that feels familiar can build user trust |
and can help improve the perception of quality. |
this often has the added benefit of better app store |
ratings—something we can all appreciate! |
<topic_end> |
<topic_start> |
consider expected behavior on each platform |
the first step is to spend some time considering what |
the expected appearance, presentation, or behavior is on this platform. |
try to forget any limitations of your current implementation, |
and just envision the ideal user experience. |
work backwards from there. |
another way to think about this is to ask, |
“how would a user of this platform expect to achieve this goal?” |
then, try to envision how that would work in your app |
without any compromises. |
this can be difficult if you aren’t a regular user of the platform. |
you might be unaware of the specific idioms and can easily miss |
them completely. for example, a lifetime android user is |
likely unaware of platform conventions on iOS, |
and the same holds true for macOS, linux, and windows. |
these differences might be subtle to you, |
but be painfully obvious to an experienced user. |
<topic_end> |
<topic_start> |
find a platform advocate |
if possible, assign someone as an advocate for each platform. |
ideally, your advocate uses the platform as their primary device, |
and can offer the perspective of a highly opinionated user. |
to reduce the number of people, combine roles. |
have one advocate for windows and android, |
one for linux and the web, and one for mac and iOS. |
the goal is to have constant, informed feedback so the app |
feels great on each platform. advocates should be encouraged |
to be quite picky, calling out anything they feel differs from |
typical applications on their device. a simple example is how |
the default button in a dialog is typically on the left on mac |
and linux, but is on the right on windows. |
details like that are easy to miss if you aren’t using a platform |
on a regular basis. |
important: advocates don’t need to be developers or |
even full-time team members. they can be designers, |
stakeholders, or external testers that are provided |
with regular builds. |
<topic_end> |
<topic_start> |
stay unique |
conforming to expected behaviors doesn’t mean that your app |
needs to use default components or styling. |
many of the most popular multiplatform apps have very distinct |
and opinionated UIs including custom buttons, context menus, |
and title bars. |
the more you can consolidate styling and behavior across platforms, |
the easier development and testing will be. |
the trick is to balance creating a unique experience with a |
strong identity, while respecting the norms of each platform. |
<topic_end> |
<topic_start> |
common idioms and norms to consider |
take a quick look at a few specific norms and idioms |
you might want to consider, and how you could approach |
them in flutter. |
<topic_end> |
<topic_start> |
scrollbar appearance and behavior |
desktop and mobile users expect scrollbars, |
but they expect them to behave differently on different platforms. |
mobile users expect smaller scrollbars that only appear |
while scrolling, whereas desktop users generally expect |
omnipresent, larger scrollbars that they can click or drag. |
flutter comes with a built-in scrollbar widget that already |
has support for adaptive colors and sizes according to the |
current platform. the one tweak you might want to make is to |
toggle alwaysShown when on a desktop platform: |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.