diff --git a/example/image/example_profile.png b/example/image/example_profile.png new file mode 100644 index 0000000..a28e7cb Binary files /dev/null and b/example/image/example_profile.png differ diff --git a/example/lib/main.dart b/example/lib/main.dart index 2442c5e..d1b6562 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -2,7 +2,7 @@ import 'dart:typed_data'; import 'package:example/utils/example_profile_service.dart'; import 'package:flutter/material.dart'; -import 'package:profile/profile.dart'; +import 'package:flutter_profile/flutter_profile.dart'; import 'utils/example_profile_data.dart'; @@ -50,6 +50,7 @@ class _ProfileExampleState extends State { Widget build(BuildContext context) { return Scaffold( body: ProfilePage( + bottomActionText: 'Log out', itemBuilderOptions: ItemBuilderOptions( inputDecorationField: { 'firstName': const InputDecoration( diff --git a/example/lib/utils/example_profile_data.dart b/example/lib/utils/example_profile_data.dart index 3091752..5634051 100644 --- a/example/lib/utils/example_profile_data.dart +++ b/example/lib/utils/example_profile_data.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:profile/profile.dart'; +import 'package:flutter_profile/flutter_profile.dart'; class ExampleProfileData extends ProfileData { ExampleProfileData({ diff --git a/example/lib/utils/example_profile_service.dart b/example/lib/utils/example_profile_service.dart index ddb42ee..52139bb 100644 --- a/example/lib/utils/example_profile_service.dart +++ b/example/lib/utils/example_profile_service.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:profile/profile.dart'; +import 'package:flutter_profile/flutter_profile.dart'; class ExampleProfileService extends ProfileService { ExampleProfileService(); diff --git a/example/pubspec.lock b/example/pubspec.lock index 9668a4f..e78ef51 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -62,6 +62,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" + flutter_profile: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "0.0.1" flutter_test: dependency: "direct dev" description: flutter @@ -102,13 +109,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.2" - profile: - dependency: "direct main" - description: - path: ".." - relative: true - source: path - version: "0.0.1" sky_engine: dependency: transitive description: flutter diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 0c2ba24..f1d5956 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -34,7 +34,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 - profile: + flutter_profile: path: ../ dev_dependencies: diff --git a/lib/profile.dart b/lib/flutter_profile.dart similarity index 93% rename from lib/profile.dart rename to lib/flutter_profile.dart index 1a644a7..37389fc 100644 --- a/lib/profile.dart +++ b/lib/flutter_profile.dart @@ -1,4 +1,4 @@ -library profile; +library flutter_profile; export 'src/widgets/profile/profile_page.dart'; export 'src/widgets/profile/profile_style.dart'; diff --git a/lib/src/services/profile_service.dart b/lib/src/services/profile_service.dart index a3b62e0..a200dfc 100644 --- a/lib/src/services/profile_service.dart +++ b/lib/src/services/profile_service.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:profile/profile.dart'; +import 'package:flutter_profile/src/models/user.dart'; /// ProfileService can be extended and set for the profilePage. The following method can be overriden. /// diff --git a/lib/src/widgets/avatar/avatar.dart b/lib/src/widgets/avatar/avatar.dart index 80cfc2b..6fc3eec 100644 --- a/lib/src/widgets/avatar/avatar.dart +++ b/lib/src/widgets/avatar/avatar.dart @@ -1,7 +1,7 @@ import 'dart:typed_data'; import 'package:flutter/material.dart'; -import 'package:profile/src/widgets/avatar/avatar_style.dart'; +import 'package:flutter_profile/src/widgets/avatar/avatar_style.dart'; class Avatar extends StatelessWidget { const Avatar({ diff --git a/lib/src/widgets/item_builder/item_builder.dart b/lib/src/widgets/item_builder/item_builder.dart index 4321595..fa79807 100644 --- a/lib/src/widgets/item_builder/item_builder.dart +++ b/lib/src/widgets/item_builder/item_builder.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:profile/src/widgets/item_builder/item_builder_options.dart'; +import 'package:flutter_profile/src/widgets/item_builder/item_builder_options.dart'; /// ItemBuilder is used to set the standard textfield for each undefined users data item. /// diff --git a/lib/src/widgets/item_builder/item_list.dart b/lib/src/widgets/item_builder/item_list.dart index 21c7af2..367639e 100644 --- a/lib/src/widgets/item_builder/item_list.dart +++ b/lib/src/widgets/item_builder/item_list.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:profile/src/widgets/item_builder/item_builder.dart'; -import 'package:profile/src/widgets/item_builder/item_builder_options.dart'; +import 'package:flutter_profile/src/widgets/item_builder/item_builder.dart'; +import 'package:flutter_profile/src/widgets/item_builder/item_builder_options.dart'; class ItemList extends StatefulWidget { const ItemList( diff --git a/lib/src/widgets/profile/profile_page.dart b/lib/src/widgets/profile/profile_page.dart index 3d76986..aae0db7 100644 --- a/lib/src/widgets/profile/profile_page.dart +++ b/lib/src/widgets/profile/profile_page.dart @@ -1,6 +1,10 @@ import 'package:flutter/material.dart'; -import 'package:profile/profile.dart'; -import 'package:profile/src/widgets/profile/proifle_wrapper.dart'; +import 'package:flutter_profile/src/models/user.dart'; +import 'package:flutter_profile/src/services/profile_service.dart'; +import 'package:flutter_profile/src/widgets/item_builder/item_builder.dart'; +import 'package:flutter_profile/src/widgets/item_builder/item_builder_options.dart'; +import 'package:flutter_profile/src/widgets/profile/profile_style.dart'; +import 'package:flutter_profile/src/widgets/profile/proifle_wrapper.dart'; /// The ProfilePage widget is able to show the data of a user. By default the user is able to change this data. The widget has a couple of parameters listed below: /// diff --git a/lib/src/widgets/profile/profile_style.dart b/lib/src/widgets/profile/profile_style.dart index 1d38b0d..5d09954 100644 --- a/lib/src/widgets/profile/profile_style.dart +++ b/lib/src/widgets/profile/profile_style.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:profile/src/widgets/avatar/avatar_style.dart'; +import 'package:flutter_profile/src/widgets/avatar/avatar_style.dart'; /// ProfielStyle is used to set a couple of style paramaters for the whole profile page. /// diff --git a/lib/src/widgets/profile/proifle_wrapper.dart b/lib/src/widgets/profile/proifle_wrapper.dart index 580ea0a..866fe49 100644 --- a/lib/src/widgets/profile/proifle_wrapper.dart +++ b/lib/src/widgets/profile/proifle_wrapper.dart @@ -1,11 +1,11 @@ import 'package:flutter/material.dart'; -import 'package:profile/src/models/user.dart'; -import 'package:profile/src/services/profile_service.dart'; -import 'package:profile/src/widgets/avatar/avatar.dart'; -import 'package:profile/src/widgets/item_builder/item_builder.dart'; -import 'package:profile/src/widgets/item_builder/item_builder_options.dart'; -import 'package:profile/src/widgets/item_builder/item_list.dart'; -import 'package:profile/src/widgets/profile/profile_style.dart'; +import 'package:flutter_profile/src/models/user.dart'; +import 'package:flutter_profile/src/services/profile_service.dart'; +import 'package:flutter_profile/src/widgets/avatar/avatar.dart'; +import 'package:flutter_profile/src/widgets/item_builder/item_builder.dart'; +import 'package:flutter_profile/src/widgets/item_builder/item_builder_options.dart'; +import 'package:flutter_profile/src/widgets/item_builder/item_list.dart'; +import 'package:flutter_profile/src/widgets/profile/profile_style.dart'; class ProfileWrapper extends StatefulWidget { const ProfileWrapper({ diff --git a/pubspec.yaml b/pubspec.yaml index 0c7b99f..e425458 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,4 +1,4 @@ -name: profile +name: flutter_profile description: A new Flutter package project. version: 0.0.1 homepage: diff --git a/test/profile_test.dart b/test/profile_test.dart index 322216e..674b073 100644 --- a/test/profile_test.dart +++ b/test/profile_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_profile/flutter_profile.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:profile/profile.dart'; import 'test_classes/test_profile_data.dart'; import 'test_classes/test_profile_service.dart'; diff --git a/test/test_classes/test_profile_data.dart b/test/test_classes/test_profile_data.dart index b13ccc3..1207ab6 100644 --- a/test/test_classes/test_profile_data.dart +++ b/test/test_classes/test_profile_data.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:profile/profile.dart'; +import 'package:flutter_profile/flutter_profile.dart'; class TestProfileData extends ProfileData { TestProfileData({ diff --git a/test/test_classes/test_profile_service.dart b/test/test_classes/test_profile_service.dart index 185df60..1f79a75 100644 --- a/test/test_classes/test_profile_service.dart +++ b/test/test_classes/test_profile_service.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:profile/profile.dart'; +import 'package:flutter_profile/flutter_profile.dart'; class TestProfileService extends ProfileService { TestProfileService();