Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies:
nstack:
git:
url: git://github.com/nstack-io/flutter-sdk.git
ref: v0.4.1
ref: v0.5.0

dev_dependencies:
build_runner:
Expand Down Expand Up @@ -69,8 +69,7 @@ Now increment the `"version"` number and save (⌘s) to trigger an update.

## Example

Import your `nstack.dart` file and plant your `NStackWidget` at the root of your application.\
Use `NStackAppOpen` for submitting [AppOpen] events.
Import your `nstack.dart` file and plant your `NStackWidget` in the builder of your application.

```dart
import 'package:flutter/material.dart';
Expand All @@ -84,11 +83,14 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: NStackAppOpen(
child: Scaffold(
appBar: AppBar(
title: Text(context.localization.test.title),
),
builder: (context, child) {
return NStackWidget(
child: child!,
);
},
home: Scaffold(
appBar: AppBar(
title: Text(context.localization.test.title),
),
),
);
Expand Down
9 changes: 6 additions & 3 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: NStackWidget(
builder: (context, child) {
return NStackWidget(
platformOverride: AppOpenPlatform.android,
child: MainScreen()
),
child: child!,
);
},
home: MainScreen(),
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.4.1"
version: "0.5.0"
package_config:
dependency: transitive
description:
Expand Down