From 7593d6ca6bd536a9e7d6a7b02345c72c50232e3d Mon Sep 17 00:00:00 2001 From: moktadir Date: Tue, 14 May 2024 23:58:25 +0600 Subject: [PATCH] new navbar --- android/app/build.gradle | 4 +- animations/map.json | 1 + .../navbar/fixed_bottom_navbar.dart | 107 ++++++++++++++++++ ...avbar.dart => floating_bottom_navbar.dart} | 4 +- .../home-with-restAPI/views/home_view.dart | 5 +- .../onboarding/views/onboarding_view.dart | 4 +- lib/app/routes/app_pages.dart | 16 ++- lib/app/routes/app_routes.dart | 6 +- lib/app/service/REST/dio_client.dart | 4 +- lib/my_app.dart | 2 +- 10 files changed, 135 insertions(+), 18 deletions(-) create mode 100644 animations/map.json create mode 100644 lib/app/components/navbar/fixed_bottom_navbar.dart rename lib/app/components/navbar/{bottom_navbar.dart => floating_bottom_navbar.dart} (97%) diff --git a/android/app/build.gradle b/android/app/build.gradle index 87c87c8..2983ae8 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -45,8 +45,8 @@ android { applicationId "com.example.getx_standard" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion + minSdkVersion 24 + targetSdkVersion 34 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/animations/map.json b/animations/map.json new file mode 100644 index 0000000..d7062bf --- /dev/null +++ b/animations/map.json @@ -0,0 +1 @@ +{"ip":0,"fr":60,"v":"5.1.20","assets":[],"layers":[{"ty":4,"nm":"Group 4","ip":0,"st":0,"ind":3,"hix":1,"ks":{"o":{"a":0,"k":100},"or":{"a":0,"k":[0,0,0]},"a":{"a":0,"k":[45.5,69,0]},"p":{"s":true,"x":{"a":1,"k":[{"t":0,"s":[187.162],"e":[271.162],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":60,"s":[271.162],"e":[291.162],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":120,"s":[291.162],"e":[321.162],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":180,"s":[321.162],"e":[316.162],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":240,"s":[316.162],"e":[316.162],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":300,"s":[316.162],"e":[321.162],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":360,"s":[321.162],"e":[251.162],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":420,"s":[251.162],"e":[205.162],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":480,"s":[205.162],"e":[187.162],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":540}]},"y":{"a":1,"k":[{"t":0,"s":[143.649],"e":[180.649],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":60,"s":[180.649],"e":[141.649],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":120,"s":[141.649],"e":[159.649],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":180,"s":[159.649],"e":[188.649],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":240,"s":[188.649],"e":[188.649],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":300,"s":[188.649],"e":[159.649],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":360,"s":[159.649],"e":[116.649],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":420,"s":[116.649],"e":[148.649],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":480,"s":[148.649],"e":[143.649],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":540}]}},"rx":{"a":0,"k":0},"ry":{"a":0,"k":0},"rz":{"a":0,"k":0},"s":{"a":0,"k":[100,100]}},"shapes":[{"ty":"gr","nm":"Group 4 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[45.2333,15.8581],[15.7771,45.3144],[45.2333,74.7706],[74.6896,45.3144]],"i":[[16.268500000000003,0],[0,-16.2685],[-16.2685,0],[0,16.268500000000003]],"o":[[-16.2685,0],[0,16.268500000000003],[16.268500000000003,0],[0,-16.2685]]}}},{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[45.2333,65.2662],[25.2825,45.3154],[45.2333,25.3646],[65.1841,45.3154]],"i":[[11.018799999999999,0],[0,11.018800000000006],[-11.018799999999999,0],[0,-11.018799999999999]],"o":[[-11.018799999999999,0],[0,-11.018799999999999],[11.018799999999999,0],[0,11.018800000000006]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[1,0.5490196078431373,0.5372549019607843,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]},{"ty":"gr","nm":"Group 4 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[45.2333,0],[0,45.1823],[40.6793,133.348],[45.2333,138],[49.7874,133.348],[90.4666,45.1823]],"i":[[24.981300000000005,0],[0,-24.9533],[-13.153799999999997,-35.57080000000002],[-2.6422999999999988,0],[-0.5334999999999965,1.440999999999974],[0,37.927800000000005]],"o":[[-24.9812,0],[0,37.927800000000005],[0.5334000000000003,1.440999999999974],[2.642400000000002,0],[13.1537,-35.569800000000015],[0,-24.9533]]}}},{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[45.2333,65.2662],[25.2825,45.3154],[45.2333,25.3646],[65.1841,45.3154]],"i":[[11.018799999999999,0],[0,11.018800000000006],[-11.018799999999999,0],[0,-11.018799999999999]],"o":[[-11.018799999999999,0],[0,-11.018799999999999],[11.018799999999999,0],[0,11.017800000000001]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[0.9372549019607843,0.2196078431372549,0.20392156862745098,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]}],"op":600},{"ty":4,"nm":"Group 1","ip":0,"st":0,"ind":2,"hix":2,"ks":{"o":{"a":1,"k":[{"t":0,"s":[100],"e":[100],"i":{"x":[1],"y":[1]},"o":{"x":[0],"y":[0]}},{"t":246,"s":[100],"e":[50],"i":{"x":[1],"y":[1]},"o":{"x":[0],"y":[0]}},{"t":247,"s":[50],"e":[100],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":260,"s":[100],"e":[50],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":273,"s":[50],"e":[50],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":287,"s":[50],"e":[100],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":300,"s":[100],"e":[100],"i":{"x":[1],"y":[1]},"o":{"x":[0],"y":[0]}},{"t":547,"s":[100],"e":[50],"i":{"x":[1],"y":[1]},"o":{"x":[0],"y":[0]}},{"t":548,"s":[50],"e":[100],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":561,"s":[100],"e":[50],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":574,"s":[50],"e":[50],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":587,"s":[50],"e":[100],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":600}]},"or":{"a":0,"k":[0,0,0]},"a":{"a":0,"k":[4.5,4.5,0]},"p":{"s":true,"x":{"a":1,"k":[{"t":0,"s":[187.162],"e":[271.162],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":60,"s":[271.162],"e":[291.162],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":120,"s":[291.162],"e":[321.162],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":180,"s":[321.162],"e":[316.162],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":240,"s":[316.162],"e":[316.162],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":300,"s":[316.162],"e":[321.162],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":360,"s":[321.162],"e":[251.162],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":419,"s":[251.162],"e":[205.412],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":479,"s":[205.412],"e":[187.162],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":540}]},"y":{"a":1,"k":[{"t":0,"s":[222.649],"e":[259.649],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":60,"s":[259.649],"e":[220.649],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":120,"s":[220.649],"e":[238.649],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":180,"s":[238.649],"e":[267.649],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":240,"s":[267.649],"e":[267.649],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":300,"s":[267.649],"e":[238.649],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":360,"s":[238.649],"e":[195.649],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":419,"s":[195.649],"e":[227.861],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":479,"s":[227.861],"e":[222.649],"i":{"x":[0.515],"y":[0.955]},"o":{"x":[0.455],"y":[0.03]}},{"t":540}]}},"rx":{"a":0,"k":0},"ry":{"a":0,"k":0},"rz":{"a":0,"k":0},"s":{"a":1,"k":[{"t":0,"s":[100,100],"e":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[100,100],"e":[190,190],"i":{"x":[0.515,0.515],"y":[0.955,0.955]},"o":{"x":[0.455,0.455],"y":[0.03,0.03]}},{"t":254,"s":[190,190],"e":[50,51.71845350894626],"i":{"x":[0.515,0.5561770816685313],"y":[0.955,0.8528789161727349]},"o":{"x":[0.455,0.4674764264024293],"y":[0.03,0.0285774767146486]}},{"t":268,"s":[50,51.71845350894626],"e":[51.42920961344556,50],"i":{"x":[0.6840929670993058,0.6469246449024493],"y":[0.46212534059945504,0.8515395894428146]},"o":{"x":[0.35158466646543923,0.3144756851198763],"y":[0.11957960295834956,0.5095307917888556]}},{"t":269,"s":[51.42920961344556,50],"e":[190,190],"i":{"x":[0.5052992270300424,0.515],"y":[0.9571404654277582,0.955]},"o":{"x":[0.4170053390708423,0.455],"y":[0.12852279703108427,0.03]}},{"t":284,"s":[190,190],"e":[100,100],"i":{"x":[0.515,0.515],"y":[0.955,0.955]},"o":{"x":[0.455,0.455],"y":[0.03,0.03]}},{"t":300,"s":[100,100],"e":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":540,"s":[100,100],"e":[190,190],"i":{"x":[0.515,0.515],"y":[0.955,0.955]},"o":{"x":[0.455,0.455],"y":[0.03,0.03]}},{"t":556,"s":[190,190],"e":[50,50],"i":{"x":[0.515,0.515],"y":[0.955,0.955]},"o":{"x":[0.455,0.455],"y":[0.03,0.03]}},{"t":573,"s":[50,50],"e":[190,190],"i":{"x":[0.515,0.515],"y":[0.955,0.955]},"o":{"x":[0.455,0.455],"y":[0.03,0.03]}},{"t":587,"s":[190,190],"e":[100,100],"i":{"x":[0.515,0.515],"y":[0.955,0.955]},"o":{"x":[0.455,0.455],"y":[0.03,0.03]}},{"t":600}]}},"shapes":[{"ty":"gr","nm":"Group 1 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[4.5,8.91367],[9,4.45684],[4.5,0],[0,4.45684]],"i":[[-2.48528,0],[0,2.4614400000000005],[2.4852800000000004,0],[0,-2.4614499999999997]],"o":[[2.4852800000000004,0],[0,-2.4614499999999997],[-2.48528,0],[0,2.4614400000000005]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[0.9372549019607843,0.2196078431372549,0.20392156862745098,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]}],"op":600},{"ty":4,"nm":"Group 2","ip":0,"st":0,"ind":1,"hix":3,"ks":{"o":{"a":0,"k":100},"or":{"a":0,"k":[0,0,0]},"a":{"a":0,"k":[126.5,126.5,0]},"p":{"s":true,"x":{"a":0,"k":250},"y":{"a":0,"k":248.6490020751953}},"rx":{"a":0,"k":0},"ry":{"a":0,"k":0},"rz":{"a":0,"k":0},"s":{"a":0,"k":[100,100]}},"shapes":[{"ty":"gr","nm":"Group 2 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[156.936,90.2214],[131.753,74.2057],[153.256,60.3483],[156.936,61.9757]],"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[0.5450980392156862,0.792156862745098,0.5176470588235295,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]},{"ty":"gr","nm":"Group 2 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[156.936,115.056],[156.849,95.8051],[164.228,100.563]],"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[0.2,0.5843137254901961,0.8235294117647058,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]},{"ty":"gr","nm":"Group 2 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[206.394,67.5424],[196.199,112.789],[156.936,90.2214],[156.936,61.9757],[198.47,49.8712],[202.67,52.2973]],"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[-0.45299999999997453,-1.8571999999999989]],"o":[[0,0],[0,0],[0,0],[0,0],[1.835000000000008,-0.5348000000000042],[0,0]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[0.2235294117647059,0.7098039215686275,0.2901960784313726,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]},{"ty":"gr","nm":"Group 2 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[228.728,174.371],[187.395,182.749],[208.763,77.2359],[231.444,170.093]],"i":[[1.954999999999984,-0.396000000000015],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0.4730000000000132,1.9399999999999977]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[0.2,0.5843137254901961,0.8235294117647058,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]},{"ty":"gr","nm":"Group 2 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[181.043,184.037],[156.936,188.922],[156.936,125.426],[168.261,103.002],[195.455,117.434]],"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[0.996078431372549,0.7411764705882353,0.06666666666666667,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]},{"ty":"gr","nm":"Group 2 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[156.936,188.922],[132.418,180.48],[156.936,125.426]],"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[1,0.8235294117647058,0.4549019607843137,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]},{"ty":"gr","nm":"Group 2 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[147.882,134.671],[101.369,112.797],[103.756,92.3917],[126.967,77.2369],[156.849,95.8051],[156.936,115.056]],"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[0.5137254901960784,0.7019607843137254,0.8784313725490196,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]},{"ty":"gr","nm":"Group 2 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[101.369,112.797],[84.0196,105.96],[103.756,92.3917]],"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[0.2,0.5843137254901961,0.8235294117647058,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]},{"ty":"gr","nm":"Group 2 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[148.133,58.0837],[104.46,86.3685],[109.752,41.1168],[149.121,58.5201]],"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[1,0.8235294117647058,0.4549019607843137,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]},{"ty":"gr","nm":"Group 2 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[78.7078,103.867],[42.8225,90.2836],[56.7643,51.5969],[59.8225,49.0655],[109.753,41.1168],[104.46,86.3675]],"i":[[0,0],[0,0],[0,0],[-1.4046999999999983,0.2237000000000009],[0,0],[0,0]],"o":[[0,0],[0,0],[0.48160000000000025,-1.3373999999999953],[0,0],[0,0],[0,0]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[0.996078431372549,0.7411764705882353,0.06666666666666667,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]},{"ty":"gr","nm":"Group 2 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[127.942,178.939],[94.9613,167.583],[100.826,117.434],[145.95,138.827]],"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[0.5450980392156862,0.792156862745098,0.5176470588235295,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]},{"ty":"gr","nm":"Group 2 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[94.9613,167.583],[19.701,171.726],[15.505,166.089],[41.4991,93.9589],[100.827,117.435]],"i":[[0,0],[0,0],[-1.0235000000000003,2.8389999999999986],[0,0],[0,0]],"o":[[0,0],[-3.0131000000000014,0.16499999999999204],[0,0],[0,0],[0,0]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[0.2235294117647059,0.7098039215686275,0.2901960784313726,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]},{"ty":"gr","nm":"Group 2 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[228.728,174.371],[156.936,188.922],[156.936,61.9757],[198.574,49.8411],[202.644,52.1919],[231.443,170.094]],"i":[[1.954999999999984,-0.396000000000015],[0,0],[0,0],[0,0],[-0.43899999999999295,-1.7989999999999995],[0,0]],"o":[[0,0],[0,0],[0,0],[1.7789999999999964,-0.5187999999999988],[0,0],[0.47399999999998954,1.938999999999993]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[1,0.9764705882352941,0.9372549019607843,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]},{"ty":"gr","nm":"Group 2 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[156.936,188.922],[94.9613,167.583],[109.752,41.1168],[156.936,61.9757]],"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[1,0.9764705882352941,0.9372549019607843,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]},{"ty":"gr","nm":"Group 2 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[94.9613,167.583],[19.5044,171.737],[15.4377,166.274],[56.8295,51.4143],[59.6309,49.0956],[109.752,41.1158]],"i":[[0,0],[0,0],[-0.991299999999999,2.7520000000000095],[0,0],[-1.2862999999999971,0.20570000000000022],[0,0]],"o":[[0,0],[-2.9208,0.1599999999999966],[0,0],[0.4414999999999978,-1.2250999999999976],[0,0],[0,0]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[1,0.9764705882352941,0.9372549019607843,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]},{"ty":"gr","nm":"Group 2 shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[126.5,253],[253,126.5],[126.5,0],[0,126.5]],"i":[[-69.864,0],[0,69.864],[69.864,0],[0,-69.864]],"o":[[69.864,0],[0,-69.864],[-69.864,0],[0,69.864]]}}},{"ty":"st","o":{"a":0,"k":0},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"lc":3,"lj":1,"ml":1},{"ty":"fl","o":{"a":0,"k":100},"r":1,"c":{"a":0,"k":[0.8941176470588236,0.9411764705882353,0.8313725490196079,1]}},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0}}]}],"op":600}],"op":600,"w":500,"h":500} \ No newline at end of file diff --git a/lib/app/components/navbar/fixed_bottom_navbar.dart b/lib/app/components/navbar/fixed_bottom_navbar.dart new file mode 100644 index 0000000..75c18d4 --- /dev/null +++ b/lib/app/components/navbar/fixed_bottom_navbar.dart @@ -0,0 +1,107 @@ +// ignore_for_file: no_leading_underscores_for_local_identifiers, must_be_immutable + +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:iconly/iconly.dart'; + +import 'navbar_controller.dart'; + +class FixedBottomNavbar extends GetView { + const FixedBottomNavbar({super.key}); + + @override + Widget build(BuildContext context) { + var theme = Theme.of(context); + + return Scaffold( + resizeToAvoidBottomInset: false, + extendBody: false, + body: Obx(() => controller.navigation[controller.selectedIndex.value]), + bottomNavigationBar: Obx(() => Container( + width: MediaQuery.of(context).size.width, + height: 80.h, + color: theme.primaryColor, + padding: EdgeInsets.only(bottom: 18.sp, left: 18.sp, right: 18.sp), + child: SizedBox( + width: MediaQuery.of(context).size.width, + height: 75.h, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + /// ITEM 1 + Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: 40.h, + width: 40.w, + child: IconButton( + hoverColor: Colors.transparent, + onPressed: () { + controller.onTap(0); + }, + icon: Icon( + controller.selectedIndex.value == 0 + ? IconlyBold.home + : IconlyLight.home, + color: Colors.white, + size: 25.sp, + ), + ), + ), + SizedBox(height: 2.sp), + Container( + height: 8, + width: 8, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: controller.selectedIndex.value == 0 + ? Colors.white + : Colors.transparent, + ), + ), + ], + ), + + /// ITEM 2 + Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: 40.h, + width: 40.w, + child: IconButton( + hoverColor: Colors.transparent, + onPressed: () { + controller.onTap(1); + }, + icon: Icon( + controller.selectedIndex.value == 1 + ? IconlyBold.graph + : IconlyLight.graph, + color: Colors.white, + size: 25.sp, + ), + ), + ), + SizedBox(height: 2.sp), + Container( + height: 8, + width: 8, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: controller.selectedIndex.value == 1 + ? Colors.white + : Colors.transparent, + ), + ), + ], + ), + ], + ), + ), + )), + ); + } +} diff --git a/lib/app/components/navbar/bottom_navbar.dart b/lib/app/components/navbar/floating_bottom_navbar.dart similarity index 97% rename from lib/app/components/navbar/bottom_navbar.dart rename to lib/app/components/navbar/floating_bottom_navbar.dart index 7f86e9c..14781f2 100755 --- a/lib/app/components/navbar/bottom_navbar.dart +++ b/lib/app/components/navbar/floating_bottom_navbar.dart @@ -7,8 +7,8 @@ import 'package:iconly/iconly.dart'; import 'navbar_controller.dart'; -class BottomNavbar extends GetView { - const BottomNavbar({super.key}); +class FloatingBottomNavbar extends GetView { + const FloatingBottomNavbar({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/app/modules/example/home-with-restAPI/views/home_view.dart b/lib/app/modules/example/home-with-restAPI/views/home_view.dart index 38b4313..01254c7 100755 --- a/lib/app/modules/example/home-with-restAPI/views/home_view.dart +++ b/lib/app/modules/example/home-with-restAPI/views/home_view.dart @@ -32,8 +32,9 @@ class HomeView extends GetView { color: theme.primaryColor, onRefresh: () async => await controller.getRecipes(), child: Padding( - padding: EdgeInsets.fromLTRB( - 18.sp, 18.sp, 18.sp, controller.bottomPadding.value), + /// NOTE: IF USE FLOATING_NAV => bottom padding=controller.bottomPadding.value; + /// Otherwise 18.sp; + padding: EdgeInsets.fromLTRB(18.sp, 18.sp, 18.sp, 18.sp), child: GridView.builder( itemCount: controller.recipes.length, physics: const BouncingScrollPhysics(), diff --git a/lib/app/modules/onboarding/views/onboarding_view.dart b/lib/app/modules/onboarding/views/onboarding_view.dart index f738527..93eef44 100644 --- a/lib/app/modules/onboarding/views/onboarding_view.dart +++ b/lib/app/modules/onboarding/views/onboarding_view.dart @@ -101,7 +101,7 @@ class OnboardingView extends GetView { height: 40.sp, child: TextButton( onPressed: () { - Get.offAllNamed(Routes.NAV); + Get.offAllNamed(Routes.FLOATING_NAV); }, child: Text( "Skip", @@ -147,7 +147,7 @@ class OnboardingView extends GetView { onPressed: () { if (controller.selectedPage.value > controller.onBoardingPages.length - 2) { - Get.offAllNamed(Routes.NAV); + Get.offAllNamed(Routes.FLOATING_NAV); } else { controller.forwardAction(); } diff --git a/lib/app/routes/app_pages.dart b/lib/app/routes/app_pages.dart index a3b3dbc..a06e822 100755 --- a/lib/app/routes/app_pages.dart +++ b/lib/app/routes/app_pages.dart @@ -1,6 +1,7 @@ import 'package:get/get.dart'; +import 'package:getx_standard/app/components/navbar/fixed_bottom_navbar.dart'; -import '../components/navbar/bottom_navbar.dart'; +import '../components/navbar/floating_bottom_navbar.dart'; import '../components/navbar/navbar_binding.dart'; import '../modules/example/home-with-graphql/bindings/graphql_binding.dart'; @@ -19,15 +20,20 @@ class AppPages { AppPages._(); static const ONBOARDING = Routes.ONBOARDING; - static const NAV = Routes.NAV; + static const FIXED_NAV = Routes.FIXED_NAV; + static const FLOATING_NAV = Routes.FLOATING_NAV; static const HOME = Routes.HOME; static const POST_DETAIL = Routes.POST_DETAIL; static final routes = [ - /// NAV BAR + /// NAV BARs GetPage( - name: _Paths.NAV, - page: () => const BottomNavbar(), + name: _Paths.FIXED_NAV, + page: () => const FixedBottomNavbar(), + binding: NavbarBinding(), + ), GetPage( + name: _Paths.FLOATING_NAV, + page: () => const FloatingBottomNavbar(), binding: NavbarBinding(), ), diff --git a/lib/app/routes/app_routes.dart b/lib/app/routes/app_routes.dart index aeb8ac1..dd0eec9 100755 --- a/lib/app/routes/app_routes.dart +++ b/lib/app/routes/app_routes.dart @@ -6,7 +6,8 @@ part of 'app_pages.dart'; abstract class Routes { Routes._(); - static const NAV = _Paths.NAV; + static const FIXED_NAV = _Paths.FIXED_NAV; + static const FLOATING_NAV = _Paths.FLOATING_NAV; static const HOME = _Paths.HOME; static const POST_DETAIL = _Paths.POST_DETAIL; static const GRAPHQL = _Paths.GRAPHQL; @@ -16,7 +17,8 @@ abstract class Routes { abstract class _Paths { _Paths._(); - static const NAV = '/nav'; + static const FIXED_NAV = '/fixed_nav'; + static const FLOATING_NAV = '/floating_nav'; static const HOME = '/home'; static const POST_DETAIL = '/post_detail'; static const GRAPHQL = '/graphql'; diff --git a/lib/app/service/REST/dio_client.dart b/lib/app/service/REST/dio_client.dart index ea27eb5..e11d524 100755 --- a/lib/app/service/REST/dio_client.dart +++ b/lib/app/service/REST/dio_client.dart @@ -18,9 +18,9 @@ class DioClient { sendTimeout: const Duration(seconds: TIME_OUT_DURATION), )) ..interceptors.add(PrettyDioLogger( - requestHeader: true, + requestHeader: false, requestBody: true, - responseBody: true, + responseBody: false, responseHeader: false, error: true, compact: true, diff --git a/lib/my_app.dart b/lib/my_app.dart index 50a375d..27e2560 100644 --- a/lib/my_app.dart +++ b/lib/my_app.dart @@ -36,7 +36,7 @@ class MyApp extends GetView { ); }, - initialRoute: AppPages.NAV, + initialRoute: AppPages.FIXED_NAV, // first screen to show when app is running defaultTransition: Transition.circularReveal,