Skip to content

Tutorial sample does not work under Linux #198

@FlutterIssues

Description

@FlutterIssues

Issue by jimbeveridge
Tuesday Oct 13, 2015 at 20:05 GMT
Originally opened as https://github.com/flutter/engine/issues/1597


I realize that Linux/Mojo isn't officially supported, but I was concerned that this was indicative of a more general problem.

I'm running the sample code in the tutorial. If I take out the Center widget, it works. If I put in the center widget, it just shows a black screen. See the comments below in DemoHome.build().

import 'package:flutter/material.dart';

class MyToolBar extends StatelessComponent {
  Widget build(BuildContext context) {
    return new Container(
        height: 56.0,
        padding: const EdgeDims.symmetric(horizontal: 8.0),
        child: new Material(
            child: new Row([
          new NetworkImage(src: 'menu.png', width: 25.0, height: 25.0),
          new Flexible(child: new Text('My awesome toolbar')),
          new NetworkImage(src: 'search.png', width: 25.0, height: 25.0),
        ])));
  }
}

class DemoHome extends StatelessComponent {
  Widget build(BuildContext context) {
    // This line just gives a black screen on Linux.
    return new Center(child: new MyToolBar());
    // This line works on Linux.
    return new MyToolBar();
  }
}

void main() {
  runApp(new MaterialApp(
      title: 'Tutorial app',
      routes: {'/': (RouteArguments args) => new DemoHome()}));
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependency: fuchsiaFuchsia team may need to help usframeworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions