-bug fixed

master
nikhil-concetto 5 years ago
parent aa2588ab07
commit 9c3aeea2d3

@ -0,0 +1,22 @@
PODS:
- Flutter (1.0.0)
- fluttersliderdrawer (0.0.1):
- Flutter
DEPENDENCIES:
- Flutter (from `Flutter`)
- fluttersliderdrawer (from `.symlinks/plugins/fluttersliderdrawer/ios`)
EXTERNAL SOURCES:
Flutter:
:path: Flutter
fluttersliderdrawer:
:path: ".symlinks/plugins/fluttersliderdrawer/ios"
SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
fluttersliderdrawer: a3c3b17a7d7de2d709ca9544c33926fa1cf04599
PODFILE CHECKSUM: c34e2287a9ccaa606aeceab922830efb9a6ff69a
COCOAPODS: 1.9.1

@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
@ -13,6 +13,7 @@
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
E2DC772DA064DAD1218F1348 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A99782F0B462F8C4BEE73C68 /* Pods_Runner.framework */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
@ -32,6 +33,8 @@
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
5D209B9DE3AFF206E65E105A /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
69D4550086E09AA52FB25DFB /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
@ -42,6 +45,8 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
A99782F0B462F8C4BEE73C68 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
DBB75A7BE70B2C9041BB687E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -49,12 +54,32 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E2DC772DA064DAD1218F1348 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
116E822471D12D67044264DC /* Pods */ = {
isa = PBXGroup;
children = (
69D4550086E09AA52FB25DFB /* Pods-Runner.debug.xcconfig */,
DBB75A7BE70B2C9041BB687E /* Pods-Runner.release.xcconfig */,
5D209B9DE3AFF206E65E105A /* Pods-Runner.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
23100A4009331B2FFDC3A88B /* Frameworks */ = {
isa = PBXGroup;
children = (
A99782F0B462F8C4BEE73C68 /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
@ -72,6 +97,8 @@
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
116E822471D12D67044264DC /* Pods */,
23100A4009331B2FFDC3A88B /* Frameworks */,
);
sourceTree = "<group>";
};
@ -113,12 +140,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
E29CE29F4567019763CC96D5 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
8EDAAD5A5B453CAFE29F0875 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@ -191,6 +220,23 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
8EDAAD5A5B453CAFE29F0875 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -205,6 +251,28 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
E29CE29F4567019763CC96D5 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@ -303,7 +371,10 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
@ -418,7 +489,8 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
@ -431,18 +503,22 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = V8XSLU6QKH;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.fluttersliderdrawerExample;
PRODUCT_BUNDLE_IDENTIFIER = com.concettolabs.test1;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@ -464,7 +540,10 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",

@ -4,4 +4,7 @@
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:fluttersliderdrawer/fluttersliderdrawer.dart';
import 'package:fluttersliderdrawer/flutter_slider_drawer.dart';
import 'package:fluttersliderdrawer_example/main_widget.dart';
import 'package:fluttersliderdrawer_example/menu_widget.dart';
@ -17,25 +17,36 @@ class MyApp extends StatefulWidget {
class _MyAppState extends State<MyApp> {
GlobalKey<SliderMenuContainerState> _key =
new GlobalKey<SliderMenuContainerState>();
String title;
@override
void initState() {
title = "Home";
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: SliderMenuContainer(
appBarColor: Colors.white,
key: _key,
appBarPadding: const EdgeInsets.only(top: 30),
sliderMenuOffset: 250,
titleTextStyle: TextStyle(
color: Colors.black, fontWeight: FontWeight.bold, fontSize: 20),
appBarPadding: const EdgeInsets.only(top: 20),
sliderMenuOpenOffset: 250,
// sliderMenuCloseOffset: 50,
appBarHeight: 60,
title: Text(
title,
style: TextStyle(fontSize: 22, fontWeight: FontWeight.w700),
),
sliderMenuWidget: MenuWidget(
onItemClick: () {
onItemClick: (title) {
_key.currentState.closeDrawer();
setState(() {
this.title = title;
});
},
),
sliderMainWidget: MainWidget()),

@ -26,7 +26,8 @@ class _MainWidgetState extends State<MainWidget> {
@override
Widget build(BuildContext context) {
return ListView.separated(
return Container(
child: ListView.separated(
padding: const EdgeInsets.symmetric(horizontal: 10),
itemBuilder: (buider, index) {
return LimitedBox(
@ -42,7 +43,7 @@ class _MainWidgetState extends State<MainWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(15),
padding: const EdgeInsets.all(12),
child: Text(
dataList[index].name,
style: TextStyle(
@ -52,14 +53,16 @@ class _MainWidgetState extends State<MainWidget> {
),
),
Padding(
padding: const EdgeInsets.all(15),
padding: const EdgeInsets.all(10),
child: Flexible(
child: Text(
dataList[index].detail,
style: TextStyle(
fontFamily: 'BalsamiqSans_Regular',
fontSize: 20,
fontSize: 15,
color: Colors.white),
),
),
)
],
),
@ -72,7 +75,8 @@ class _MainWidgetState extends State<MainWidget> {
thickness: 0,
);
},
itemCount: dataList.length);
itemCount: dataList.length),
);
}
}

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
class MenuWidget extends StatelessWidget {
final Function onItemClick;
final Function(String) onItemClick;
const MenuWidget({Key key, this.onItemClick}) : super(key: key);
@ -59,5 +59,7 @@ class MenuWidget extends StatelessWidget {
icons,
color: Colors.black,
),
onTap: onItemClick);
onTap: () {
onItemClick(title);
});
}

@ -0,0 +1 @@
export 'slider_drawer_widget.dart';

@ -1 +0,0 @@
export 'slider_drawe_widget.dart';

@ -4,12 +4,15 @@ class SliderMenuContainer extends StatefulWidget {
final Widget sliderMenuWidget;
final Widget sliderMainWidget;
final int sliderAnimationTimeInMilliseconds;
final double sliderMenuOffset;
final double sliderMenuOpenOffset;
final double sliderMenuCloseOffset;
/*final double sliderMainOffset;*/
final Color drawerIconColor;
final Widget drawerIcon;
final TextStyle titleTextStyle;
final double drawerIconSize;
final double appBarHeight;
final Widget title;
final bool isTitleCenter;
final Widget trailing;
final Color appBarColor;
@ -20,14 +23,17 @@ class SliderMenuContainer extends StatefulWidget {
this.sliderMenuWidget,
this.sliderMainWidget,
this.sliderAnimationTimeInMilliseconds = 200,
this.sliderMenuOffset = 265,
this.sliderMenuOpenOffset = 265,
this.drawerIconColor = Colors.black,
this.drawerIcon,
this.titleTextStyle,
this.isTitleCenter = true,
this.trailing,
this.appBarColor = Colors.white,
this.appBarPadding,
this.title,
this.drawerIconSize = 27,
this.appBarHeight,
this.sliderMenuCloseOffset = 0,
/* this.sliderMainOffset = 0*/
}) : assert(sliderMenuWidget != null),
assert(sliderMainWidget != null),
@ -49,13 +55,16 @@ class SliderMenuContainerState extends State<SliderMenuContainer>
double db = 0;
bool get isDrawerOpen => _isSlideBarOpen;
Animation<double> _translationValues;
void toggle() {
setState(() {
_isSlideBarOpen
? _animationController.forward()
: _animationController.reverse();
_slideBarXOffset = _isSlideBarOpen ? widget.sliderMenuOffset : 0;
_slideBarXOffset = _isSlideBarOpen
? widget.sliderMenuOpenOffset
: widget.sliderMenuCloseOffset;
// _slideBarYOffset = _isSlideBarOpen ? widget.sliderMainOffset : 0;
_pageScale = _isSlideBarOpen ? 0.8 : 1;
});
@ -64,7 +73,7 @@ class SliderMenuContainerState extends State<SliderMenuContainer>
void openDrawer() {
setState(() {
_animationController.forward();
_slideBarXOffset = widget.sliderMenuOffset;
_slideBarXOffset = widget.sliderMenuOpenOffset;
// _slideBarYOffset = widget.sliderMainOffset;
_pageScale = 0.8;
});
@ -73,7 +82,7 @@ class SliderMenuContainerState extends State<SliderMenuContainer>
void closeDrawer() {
setState(() {
_animationController.reverse();
_slideBarXOffset = 0;
_slideBarXOffset = widget.sliderMenuCloseOffset;
_slideBarYOffset = 0;
_pageScale = 1;
});
@ -83,6 +92,7 @@ class SliderMenuContainerState extends State<SliderMenuContainer>
void initState() {
super.initState();
_animationController = AnimationController(
vsync: this,
duration:
@ -92,31 +102,36 @@ class SliderMenuContainerState extends State<SliderMenuContainer>
@override
Widget build(BuildContext context) {
return Container(
child: Container(
child: Stack(children: <Widget>[
Container(
width: widget.sliderMenuOffset,
width: widget.sliderMenuOpenOffset,
child: widget.sliderMenuWidget,
),
AnimatedContainer(
padding: widget.appBarPadding ?? const EdgeInsets.only(top: 24),
duration: Duration(
milliseconds: widget.sliderAnimationTimeInMilliseconds),
duration:
Duration(milliseconds: widget.sliderAnimationTimeInMilliseconds),
curve: Curves.easeIn,
width: double.infinity,
height: double.infinity,
color: Colors.white,
transform: Matrix4.translationValues(
_slideBarXOffset, _slideBarYOffset, 1.0),
color: widget.appBarColor,
child: Column(
children: <Widget>[
Row(
Container(
padding: widget.appBarPadding ?? const EdgeInsets.only(top: 24),
color: widget.appBarColor,
child: Row(
children: <Widget>[
SizedBox(
height: widget.appBarHeight ?? 0,
),
widget.drawerIcon ??
IconButton(
icon: AnimatedIcon(
icon: AnimatedIcons.menu_close,
color: widget.drawerIconColor,
size: widget.drawerIconSize,
progress: _animationController),
onPressed: () {
_isSlideBarOpen = !_isSlideBarOpen;
@ -125,9 +140,9 @@ class SliderMenuContainerState extends State<SliderMenuContainer>
Expanded(
child: widget.isTitleCenter
? Center(
child: _titleWidget(),
child: widget.title,
)
: _titleWidget(),
: widget.title,
),
widget.trailing ??
SizedBox(
@ -135,11 +150,11 @@ class SliderMenuContainerState extends State<SliderMenuContainer>
)
],
),
),
Expanded(child: widget.sliderMainWidget),
],
)),
])),
);
]));
}
@override
@ -147,10 +162,4 @@ class SliderMenuContainerState extends State<SliderMenuContainer>
super.dispose();
_animationController.dispose();
}
_titleWidget() => Text(
'Title',
textAlign: TextAlign.center,
style: widget.titleTextStyle ?? TextStyle(color: Colors.black),
);
}

@ -1,6 +1,6 @@
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:fluttersliderdrawer/fluttersliderdrawer.dart';
import 'package:fluttersliderdrawer/flutter_slider_drawer.dart';
void main() {
const MethodChannel channel = MethodChannel('fluttersliderdrawer');

Loading…
Cancel
Save