Skip to content

Move Brightness to dart:ui in the engine (#27479).#27481

Merged
matthew-carroll merged 1 commit intoflutter:masterfrom
matthew-carroll:27479_move_brightness_definition
Feb 5, 2019
Merged

Move Brightness to dart:ui in the engine (#27479).#27481
matthew-carroll merged 1 commit intoflutter:masterfrom
matthew-carroll:27479_move_brightness_definition

Conversation

@matthew-carroll
Copy link
Contributor

Moves Brightness to the engine. This PR simply re-exports Brightness from system_chrome.dart to stay backwards compatible.

Engine PR is here:
flutter/engine#7678

@Hixie
Copy link
Contributor

Hixie commented Feb 4, 2019

LGTM

@matthew-carroll matthew-carroll force-pushed the 27479_move_brightness_definition branch from e787514 to f661d38 Compare February 4, 2019 21:57
@matthew-carroll matthew-carroll force-pushed the 27479_move_brightness_definition branch from f661d38 to efbb4d9 Compare February 5, 2019 01:30
@matthew-carroll matthew-carroll merged commit 9b053dd into flutter:master Feb 5, 2019
@rostopira
Copy link
Contributor

rostopira commented Feb 7, 2019

Now using master branch Brightness can't be resolved

Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.2.1-pre.117, on Mac OS X 10.14.1 18B75, locale en-BY)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
[✓] Android Studio (version 3.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2018.3.4)
[!] VS Code (version 1.30.2)
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (2 available)

@matthew-carroll
Copy link
Contributor Author

@rostopira I'm not sure what you mean by master Brightness. Can you provide sample code that shows the issue?

@rostopira
Copy link
Contributor

rostopira commented Feb 7, 2019

@matthew-carroll thanks for quick response
I meant master branch, missed word
Code is pretty simple

theme: new ThemeData(
        brightness: Brightness.dark,

Intellij IDEA says "Undefined name 'Brightness'"
Imports that I have in this file:

import 'dart:io';
import 'dart:ui';
import 'dart:isolate';
import 'dart:convert';
import 'package:flutter/services.dart';
import 'package:flutter/material.dart';

@matthew-carroll
Copy link
Contributor Author

matthew-carroll commented Feb 7, 2019

Ok, for now can you deal with that by importing Brightness

import 'dart:ui' show Brightness;

I'll look at putting up a PR tomorrow that gets Brightness back in Material or wherever it was coming from previously.

@matthew-carroll
Copy link
Contributor Author

You mentioned that you're importing "dart:ui", that should include Brightness. Again, I'll look in tomorrow, but I thought "dart:ui" was correctly exporting it.

@rostopira
Copy link
Contributor

@matthew-carroll yeah, IsolateNameServer import is broken as well.
Confirmed working:

import 'dart:ui' show Brightness, IsolateNameServer;

@matthew-carroll
Copy link
Contributor Author

@rostopira so is everything working for you now, or are you still experiencing issues?

kangwang1988 pushed a commit to XianyuTech/flutter that referenced this pull request Feb 12, 2019
@zoechi zoechi added the framework flutter/packages/flutter repository. See also f: labels. label Feb 12, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants