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

Added lint package and implemented all its rules #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include: package:lint/analysis_options.yaml

linter:
rules:
depend_on_referenced_packages: false
6 changes: 3 additions & 3 deletions example/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Library/SDKs/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/mariano/Dev/OpenSource/fab-circular-menu/example"
export "FLUTTER_ROOT=/Users/yousefalmutairi/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/yousefalmutairi/Desktop/dev/fab-circular-menu/example"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
Expand Down
20 changes: 9 additions & 11 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ void main() {
}

class MyApp extends StatelessWidget {

final GlobalKey<FabCircularMenuState> fabKey = GlobalKey();

@override
Expand All @@ -19,7 +18,7 @@ class MyApp extends StatelessWidget {
body: Container(
color: const Color(0xFF192A56),
child: Center(
child: RaisedButton(
child: ElevatedButton(
onPressed: () {
// The menu can be handled programatically using a key
if (fabKey.currentState.isOpen) {
Expand All @@ -28,8 +27,8 @@ class MyApp extends StatelessWidget {
fabKey.currentState.open();
}
},
color: Colors.white,
child: Text('Toggle menu programatically', style: TextStyle(color: primaryColor)),
child: Text('Toggle menu programatically',
style: TextStyle(color: primaryColor)),
),
),
),
Expand All @@ -56,7 +55,8 @@ class MyApp extends StatelessWidget {
animationDuration: const Duration(milliseconds: 800),
animationCurve: Curves.easeInOutCirc,
onDisplayChange: (isOpen) {
_showSnackBar(context, "The menu is ${isOpen ? "open" : "closed"}");
_showSnackBar(
context, "The menu is ${isOpen ? "open" : "closed"}");
},
children: <Widget>[
RawMaterialButton(
Expand Down Expand Up @@ -85,7 +85,8 @@ class MyApp extends StatelessWidget {
),
RawMaterialButton(
onPressed: () {
_showSnackBar(context, "You pressed 4. This one closes the menu on tap");
_showSnackBar(context,
"You pressed 4. This one closes the menu on tap");
fabKey.currentState.close();
},
shape: CircleBorder(),
Expand All @@ -100,12 +101,9 @@ class MyApp extends StatelessWidget {
}

void _showSnackBar(BuildContext context, String message) {
Scaffold.of(context).showSnackBar(
SnackBar(
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(message),
duration: const Duration(milliseconds: 1000),
)
);
));
}

}
27 changes: 17 additions & 10 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0"
version: "2.8.2"
boolean_selector:
dependency: transitive
description:
Expand All @@ -21,14 +21,14 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.1"
clock:
dependency: transitive
description:
Expand Down Expand Up @@ -56,7 +56,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.0.1"
version: "1.0.2"
fake_async:
dependency: transitive
description:
Expand All @@ -80,14 +80,21 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.7.0"
path:
dependency: transitive
description:
Expand All @@ -106,7 +113,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.1"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -141,7 +148,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19"
version: "0.4.8"
typed_data:
dependency: transitive
description:
Expand All @@ -155,6 +162,6 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.14.0 <3.0.0"
5 changes: 2 additions & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: example
description: FAB Circular Menu Example

publish_to: none
version: 1.0.0+1

environment:
Expand All @@ -19,5 +19,4 @@ dev_dependencies:
sdk: flutter

flutter:

uses-material-design: true
uses-material-design: true
Loading