Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Implement review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
collinjackson committed May 5, 2017
1 parent a832977 commit d7d4c77
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 47 deletions.
3 changes: 3 additions & 0 deletions packages/shared-preferences/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## [0.1.0] - 2017-05-05

* Initial Open Source release.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yourcompany.shared_preferences_example"
package="io.flutter.plugins.shared_preferences_example"
android:versionCode="1"
android:versionName="0.0.1">

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.yourcompany.shared_preferences_example;
package io.flutter.plugins.shared_preferences_example;

import android.os.Bundle;
import io.flutter.app.FlutterActivity;
Expand Down
10 changes: 7 additions & 3 deletions packages/shared-preferences/example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:async';

import 'package:flutter/material.dart';
Expand Down Expand Up @@ -39,14 +43,14 @@ class SharedPreferencesDemoState extends State<SharedPreferencesDemo> {
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text("SharedPreferences Demo"),
title: const Text("SharedPreferences Demo"),
),
body: new Center(
child: new FutureBuilder(
future: _prefs,
builder: (BuildContext context, AsyncSnapshot<SharedPreferences> snapshot) {
if (snapshot.connectionState != ConnectionState.done)
return new Text('Loading...');
if (snapshot.connectionState == ConnectionState.waiting)
return const Text('Loading...');
int counter = snapshot.requireData.getInt('counter') ?? 0;
return new Text(
'Button tapped $counter time${ counter == 1 ? '' : 's' }.\n\n'
Expand Down
42 changes: 0 additions & 42 deletions packages/shared-preferences/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,5 @@ dependencies:
shared_preferences:
path: ../

# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the Icons class.
uses-material-design: true

# To add assets to your application, add an assets section here, in
# this "flutter" section, as in:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg

# To add assets from package dependencies, first ensure the asset
# is in the lib/ directory of the dependency. Then,
# refer to the asset with a path prefixed with
# `packages/PACKAGE_NAME/`. Note: the `lib/` is implied, do not
# include `lib/` in the asset path.
#
# Here is an example:
#
# assets:
# - packages/PACKAGE_NAME/path/to/asset

# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700

0 comments on commit d7d4c77

Please sign in to comment.