Skip to content

Commit

Permalink
Flutter sdk core update
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerhgl committed Oct 26, 2020
1 parent 0bec8eb commit 970ee80
Show file tree
Hide file tree
Showing 10 changed files with 214 additions and 118 deletions.
18 changes: 18 additions & 0 deletions android/app/src/main/res/values-night/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
2 changes: 1 addition & 1 deletion lib/main.mobile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Cache.init();

App.showAds = false;
App.showAds = true;

if (App.showAds) {
Admob.initialize(Ads.getAppId());
Expand Down
4 changes: 0 additions & 4 deletions linux/main.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#include "my_application.h"

int main(int argc, char** argv) {
// Only X11 is currently supported.
// Wayland support is being developed: https://github.com/flutter/flutter/issues/57932.
gdk_set_allowed_backends("x11");

g_autoptr(MyApplication) app = my_application_new();
return g_application_run(G_APPLICATION(app), argc, argv);
}
37 changes: 32 additions & 5 deletions linux/my_application.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#include "my_application.h"

#include <flutter_linux/flutter_linux.h>
#ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h>
#endif

#include "flutter/generated_plugin_registrant.h"

Expand All @@ -14,11 +17,35 @@ G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
static void my_application_activate(GApplication* application) {
GtkWindow* window =
GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
GtkHeaderBar *header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
gtk_widget_show(GTK_WIDGET(header_bar));
gtk_header_bar_set_title(header_bar, "invmovieconcept1");
gtk_header_bar_set_show_close_button(header_bar, TRUE);
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));

// Use a header bar when running in GNOME as this is the common style used
// by applications and is the setup most users will be using (e.g. Ubuntu
// desktop).
// If running on X and not using GNOME then just use a traditional title bar
// in case the window manager does more exotic layout, e.g. tiling.
// If running on Wayland assume the header bar will work (may need changing
// if future cases occur).
gboolean use_header_bar = TRUE;
#ifdef GDK_WINDOWING_X11
GdkScreen *screen = gtk_window_get_screen(window);
if (GDK_IS_X11_SCREEN(screen)) {
const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);
if (g_strcmp0(wm_name, "GNOME Shell") != 0) {
use_header_bar = FALSE;
}
}
#endif
if (use_header_bar) {
GtkHeaderBar *header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
gtk_widget_show(GTK_WIDGET(header_bar));
gtk_header_bar_set_title(header_bar, "invmovieconcept1");
gtk_header_bar_set_show_close_button(header_bar, TRUE);
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
}
else {
gtk_window_set_title(window, "invmovieconcept1");
}

gtk_window_set_default_size(window, 1280, 720);
gtk_widget_show(GTK_WIDGET(window));

Expand Down
60 changes: 30 additions & 30 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0-nullsafety"
version: "2.5.0-nullsafety.1"
barcode:
dependency: "direct main"
description:
Expand All @@ -70,21 +70,21 @@ packages:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety"
version: "2.1.0-nullsafety.1"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.2"
version: "1.1.0-nullsafety.3"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety"
version: "1.2.0-nullsafety.1"
cli_util:
dependency: transitive
description:
Expand All @@ -98,14 +98,14 @@ packages:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety"
version: "1.1.0-nullsafety.1"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0-nullsafety.2"
version: "1.15.0-nullsafety.3"
convert:
dependency: transitive
description:
Expand Down Expand Up @@ -161,7 +161,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety"
version: "1.2.0-nullsafety.1"
ffi:
dependency: transitive
description:
Expand All @@ -175,7 +175,7 @@ packages:
name: file
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.0-nullsafety.1"
version: "6.0.0-nullsafety.2"
firebase:
dependency: transitive
description:
Expand Down Expand Up @@ -338,7 +338,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3-nullsafety"
version: "0.6.3-nullsafety.1"
json_rpc_2:
dependency: transitive
description:
Expand All @@ -359,14 +359,14 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10-nullsafety"
version: "0.12.10-nullsafety.1"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.2"
version: "1.3.0-nullsafety.4"
mime:
dependency: transitive
description:
Expand Down Expand Up @@ -424,12 +424,12 @@ packages:
source: hosted
version: "1.1.7+2"
path:
dependency: "direct dev"
dependency: "direct overridden"
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety"
version: "1.8.0-nullsafety.2"
path_drawing:
dependency: transitive
description:
Expand Down Expand Up @@ -471,7 +471,7 @@ packages:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety"
version: "1.10.0-nullsafety.2"
petitparser:
dependency: transitive
description:
Expand All @@ -492,7 +492,7 @@ packages:
name: platform
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0-nullsafety.1"
version: "3.0.0-nullsafety.2"
platform_detect:
dependency: transitive
description:
Expand All @@ -513,14 +513,14 @@ packages:
name: pool
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.0-nullsafety"
version: "1.5.0-nullsafety.2"
process:
dependency: transitive
description:
name: process
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0-nullsafety.1"
version: "4.0.0-nullsafety.2"
provider:
dependency: "direct main"
description:
Expand Down Expand Up @@ -672,42 +672,42 @@ packages:
name: source_map_stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0-nullsafety.3"
source_maps:
dependency: transitive
description:
name: source_maps
url: "https://pub.dartlang.org"
source: hosted
version: "0.10.10-nullsafety"
version: "0.10.10-nullsafety.2"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety"
version: "1.8.0-nullsafety.2"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety"
version: "1.10.0-nullsafety.4"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety"
version: "2.1.0-nullsafety.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety"
version: "1.1.0-nullsafety.1"
supercharged:
dependency: "direct main"
description:
Expand Down Expand Up @@ -735,28 +735,28 @@ packages:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety"
version: "1.2.0-nullsafety.1"
test:
dependency: "direct dev"
description:
name: test
url: "https://pub.dartlang.org"
source: hosted
version: "1.16.0-nullsafety.4"
version: "1.16.0-nullsafety.5"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19-nullsafety"
version: "0.2.19-nullsafety.2"
test_core:
dependency: transitive
description:
name: test_core
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.12-nullsafety.4"
version: "0.3.12-nullsafety.5"
tinycolor:
dependency: "direct main"
description:
Expand Down Expand Up @@ -791,7 +791,7 @@ packages:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.2"
version: "1.3.0-nullsafety.3"
universal_io:
dependency: "direct main"
description:
Expand Down Expand Up @@ -833,7 +833,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.2"
version: "2.1.0-nullsafety.3"
vm_service:
dependency: transitive
description:
Expand Down Expand Up @@ -905,5 +905,5 @@ packages:
source: hosted
version: "0.1.2"
sdks:
dart: ">=2.10.0-4.0.dev <2.10.0"
dart: ">=2.10.0-110 <=2.11.0-260.0.dev"
flutter: ">=1.16.0 <2.0.0"
4 changes: 3 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ dev_dependencies:
sdk: flutter
test: any
glob: 1.2.0
path: 1.8.0-nullsafety
# path: 1.8.0-nullsafety.2
translator: 0.1.4
intl_translation: 0.17.10
yaml: 2.2.1
dependency_overrides:
path: 1.8.0-nullsafety.2

flutter_icons:
includes:
Expand Down
1 change: 0 additions & 1 deletion windows/flutter/.template_version

This file was deleted.

Loading

0 comments on commit 970ee80

Please sign in to comment.