question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Formatting issues after moving widget up/down

See original GitHub issue

Might be a dart analyzer problem. I’m not sure.

screen shot 2018-01-08 at 9 01 32 pm

From here, swapping Padding up with Container

screen shot 2018-01-08 at 9 01 43 pm

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
scheglovcommented, Feb 7, 2018

Yes, I think this is an issue in Dart Analysis Server. Accidentally I was looking for this assist yesterday and so the same problem.

import 'package:flutter/material.dart';

main() {
  new Column(
    children: [
      new Column(
        children: [
          new Padding(
            padding: new EdgeInsets.all(16.0),
            child: new SliverToBoxAdapter(
              child: new Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: <Widget>[],
              ),
            ),
          ),
        ],
      ),
    ],
  );
}

When you try to Move widget up on new SliverToBoxAdapter, it gives wrongly formatted code.

import 'package:flutter/material.dart';

main() {
  new Column(
    children: [
      new Column(
        children: [
          new SliverToBoxAdapter(
   child: new Padding(
                       padding: new EdgeInsets.all(16.0),
              child: new Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: <Widget>[],
              ),
            ),
 ),
        ],
      ),
    ],
  );
}

https://dart-review.googlesource.com/c/sdk/+/39841 should fix this.

0reactions
xstercommented, Feb 7, 2018

I anecdotally confirm too that I haven’t seen this issue happen again. Likely just happening on swaps one level next to widgets with children like @scheglov pointed out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create an advanced widget - Android Developers
This page explains recommended practices for creating a more advanced widget that has a better user experience. Optimizations for updating widget content.
Read more >
Add widgets on iPhone - Apple Support
When you see the size you want, tap Add Widget. While the apps are still jiggling, move the widget where you want it...
Read more >
Widgets Color Widgets + Icons - Apps on Google Play
From the team behind WatchMaker, the largest watchface design community in the world - get ready to make your home screen unique with...
Read more >
Packaged Web Apps (Widgets) - W3C
This specification standardizes a packaging format and metadata for a class of software known commonly as packaged apps or widgets.
Read more >
Using the Flutter inspector
Toggle the Select Widget Mode button again to exit widget select mode. When debugging layout issues, the key fields to look at are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found