Marks Dart and Flutter Blog RSS

Google Flutter Text Widget -

Introduction This widget is probably used more than any other. The Text widget displays a string of text with single style. Multiple line texts are allowed. To style the entire text in one way, specify a ‘style’ property in the constructor of the Text Widget. To style sections of the text, use child TextSpans (see example below). The Text widget only takes up as much space as it needs. If you add a Text widget, align it to centered then view it, it may not show the text as centered because the Text widget hasn’t taken up all the available...

Read more

Google Flutter, Google Flutter Stateful Widgets -

Introduction In the previous article we introduced stateless widgets and how they can be used. Now it is time to introduce the more advanced stateful widgets. Stateful widgets are not used as often as stateless widgets but they tend to be more important as they are what makes the ui responsive to user input. Stateful widgets are useful when the part of the user interface you are describing can change dynamically. User interfaces need to respond to a variety of things: The user doing something in the user interface. Receiving data from another computer. Time passing. Examples of Stateful Widgets...

Read more

flutter, google, widgets -

What Are Widgets? Widgets are user interface components within a Flutter application. You may think that you write code that renders the widget on the screen but you dont. When you write the code for a widget, you don't write the code that directly renders it. You write the configuration for the rendering of the widget in the 'build' method of the widget. In that method you create and return a widget object that configures what you want rendered on the screen.  Flutter itself takes care of the rendering itself, as well as other things like change detection. Build Method...

Read more

Cupertino, Google Flutter, Material Design -

What Are Widgets? Introduction Widgets are really configuration objects rather than graphic objects. When you write a Widget, it is not just directly rendered on screen, it’s not as direct as that. You write them and they configure the user interface then Flutter gets them rendered on screen. Anyway lets not put the cart before the horse yet. Lets talk about the problem of creating a slick userinterface and the how design languages attempt to provide a solutionsm to these recurring problems. User Interface Design Languages Designing user interfaces is difficult but many user interfaces follow the same pattern. Just...

Read more

Google, Google Flutter, google packages -

Introduction In Dart, you don’t have to develop everything from scratch. There is a packaging system where developers can develop packages and publish them. Other people can then use these packages. Website When someone writes a package and it is published to the https://pub.dartlang.org/ site, developers can declare a dependency to that project and pull it into their project as a dependency. Then the user can add imports at the top the files to import code and use it. Note that Dart and Flutter packages follow semantic versioning rules. Core Packages Flutter comes with many packages by default. These are...

Read more