Skip to content
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
24 changes: 22 additions & 2 deletions liquid_menu_final/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,27 @@
# This file should be version controlled and should not be manually edited.

version:
revision: f139b11009aeb8ed2a3a3aa8b0066e482709dde3
channel: stable
revision: "b0850beeb25f6d5b10426284f506557f66181b36"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: b0850beeb25f6d5b10426284f506557f66181b36
base_revision: b0850beeb25f6d5b10426284f506557f66181b36
- platform: web
create_revision: b0850beeb25f6d5b10426284f506557f66181b36
base_revision: b0850beeb25f6d5b10426284f506557f66181b36

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
28 changes: 28 additions & 0 deletions liquid_menu_final/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
2 changes: 1 addition & 1 deletion liquid_menu_final/lib/ui/views/home_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class HomeView extends StatefulWidget {
}

class _HomeViewState extends State<HomeView> with TickerProviderStateMixin {
AnimationController _animationController;
late AnimationController _animationController;

@override
Widget build(BuildContext context) {
Expand Down
56 changes: 27 additions & 29 deletions liquid_menu_final/lib/ui/widgets/liquid.dart
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:liquid_menu/core/viewmodels/home_model.dart';
import 'package:liquid_menu/ui/shared/globals.dart';
import 'package:lottie/lottie.dart';
import 'package:neumorphic/neumorphic.dart';
import 'package:provider/provider.dart';

class Liquid extends StatelessWidget {
final bool isFlipped;
final AnimationController controller;

Liquid({
@required this.isFlipped,
@required this.controller,
required this.isFlipped,
required this.controller,
});

@override
Expand All @@ -36,7 +33,8 @@ class Liquid extends StatelessWidget {
boxShadow: [
BoxShadow(
blurRadius: 30.0,
color: !isFlipped ? Colors.grey[350] : Colors.white,
color:
!isFlipped ? Colors.grey[350] ?? Colors.white : Colors.white,
offset: Offset(isFlipped ? -20 : 20, isFlipped ? -30 : 30),
),
],
Expand Down Expand Up @@ -71,30 +69,30 @@ class Liquid extends StatelessWidget {
),
),
),
isFlipped
? SizedBox()
: GestureDetector(
onTap: () {
model.openLiquidMenu(controller);
},
child: NeuCard(
curveType: model.isOpening
? CurveType.emboss
: CurveType.concave,
width: 88,
height: 88,
bevel: 16,
decoration: NeumorphicDecoration(
color:
model.isOpening ? Global.activeColor : Colors.white,
borderRadius: BorderRadius.circular(8),
),
child: Icon(
model.isOpening ? Icons.lock_open : Icons.lock,
color: Colors.pinkAccent,
),
),
if (isFlipped)
SizedBox()
else
GestureDetector(
onTap: () {
model.openLiquidMenu(controller);
},
// curveType: model.isOpening
// ? CurveType.emboss
// : CurveType.concave,
// bevel: 16,
child: Container(
width: 88,
height: 88,
decoration: BoxDecoration(
color: model.isOpening ? Global.activeColor : Colors.white,
borderRadius: BorderRadius.circular(8),
),
child: Icon(
model.isOpening ? Icons.lock_open : Icons.lock,
color: Colors.pinkAccent,
),
),
),
],
),
),
Expand Down
Loading