Skip to content

Commit

Permalink
Fix StageData being used in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robiness committed Jul 18, 2023
1 parent ff979e3 commit e1853ab
Show file tree
Hide file tree
Showing 35 changed files with 132 additions and 1,281 deletions.
25 changes: 5 additions & 20 deletions example/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled.

version:
revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
revision: 796c8ef79279f9c774545b3771238c3098dbefab
channel: stable

project_type: app
Expand All @@ -13,26 +13,11 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
base_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
- platform: android
create_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
base_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
- platform: ios
create_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
base_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
- platform: linux
create_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
base_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
- platform: macos
create_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
base_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
- platform: web
create_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
base_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
- platform: windows
create_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
base_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab

# User provided section

Expand Down
35 changes: 35 additions & 0 deletions example/lib/mywidgetstage.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import 'package:example/stage_data/my_other_widget_stage.dart';
import 'package:flutter/material.dart';
import 'package:stage_craft/stage_craft.dart';
import 'package:window_manager/window_manager.dart';

Future<void> main() async {
final StageController controller = StageController();
WidgetsFlutterBinding.ensureInitialized();
// Must add this line.
await windowManager.ensureInitialized();

const WindowOptions windowOptions = WindowOptions(
size: Size(800, 600),
center: true,
backgroundColor: Colors.transparent,
skipTaskbar: false,
titleBarStyle: TitleBarStyle.hidden,
);

windowManager.waitUntilReadyToShow(windowOptions, () async {
await windowManager.show();
await windowManager.focus();
});

runApp(
MaterialApp(
home: Scaffold(
body: StageCraft(
stageController: controller,
),
),
),
);
controller.selectWidget(MyOtherWidgetStageData());
}
10 changes: 8 additions & 2 deletions example/lib/stage_data/my_other_widget_stage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ import 'package:stage_craft/stage_craft.dart';

class MyOtherWidgetStageData extends WidgetStageData {
MyOtherWidgetStageData()
: _text = StringFieldConfigurator(value: 'MyOtherWidget', name: 'text'),
_padding = PaddingFieldConfiguratorNullable(value: null, name: 'padding');
: _text = StringFieldConfigurator(
value: 'MyOtherWidget',
name: 'text',
),
_padding = PaddingFieldConfiguratorNullable(
value: null,
name: 'padding',
);

final StringFieldConfigurator _text;
final PaddingFieldConfiguratorNullable _padding;
Expand Down
7 changes: 0 additions & 7 deletions example/macos/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion example/macos/Flutter/Flutter-Debug.xcconfig

This file was deleted.

1 change: 0 additions & 1 deletion example/macos/Flutter/Flutter-Release.xcconfig

This file was deleted.

10 changes: 0 additions & 10 deletions example/macos/Flutter/GeneratedPluginRegistrant.swift

This file was deleted.

Loading

0 comments on commit e1853ab

Please sign in to comment.