Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.3.5(overrides deprecated) #39

Open
wants to merge 8 commits into
base: main
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
3 changes: 1 addition & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,7 @@ class DisplayImages extends StatelessWidget {
body: ListView.builder(
itemBuilder: (context, index) {
return SizedBox(
width: double.infinity,
child: Image.file(selectedFiles[index]));
width: double.infinity, child: Image.file(selectedFiles[index]));
},
itemCount: selectedFiles.length,
),
Expand Down
21 changes: 11 additions & 10 deletions lib/src/custom_gallery_display.dart
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ class CustomGalleryState extends State<CustomGallery>
}

Widget tabBar() {
double widthOfScreen = MediaQuery.of(context).size.width;
double widthOfScreen = MediaQuery.of(context).size.width;

Color blackColor = appTheme.focusColor;
bool cameraAndVideoEnabled = widget.enableCamera && widget.enableVideo;
Expand Down Expand Up @@ -575,14 +575,14 @@ class CustomGalleryState extends State<CustomGallery>
if (widget.enableCamera) ...[
photoTabBar(widthOfScreen)
] else ...[
videoTabBar(blackColor, widthOfScreen)
videoTabBar(blackColor, widthOfScreen)
]
],
),
),
),
),
if (cameraAndVideoEnabled) videoTabBar(blackColor,widthOfScreen),
if (cameraAndVideoEnabled) videoTabBar(blackColor, widthOfScreen),
],
),
ValueListenableBuilder(
Expand All @@ -609,7 +609,9 @@ class CustomGalleryState extends State<CustomGallery>
: widthOfScreen / 2)),
child: Container(
height: 1,
width: cameraAndVideoEnabled ? widthOfScreen / 3 : widthOfScreen / 2,
width: cameraAndVideoEnabled
? widthOfScreen / 3
: widthOfScreen / 2,
color: blackColor)),
),
),
Expand All @@ -618,7 +620,7 @@ class CustomGalleryState extends State<CustomGallery>
);
}

GestureDetector photoTabBar(double widthOfScreen) {
GestureDetector photoTabBar(double widthOfScreen) {
return GestureDetector(
onTap: () {
centerPage(numPage: 1, selectedPage: SelectedPage.center);
Expand All @@ -628,7 +630,8 @@ class CustomGalleryState extends State<CustomGallery>
height: 40,
child: Center(
child: Text(tapsNames.photoText,
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
style:
const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
),
),
);
Expand All @@ -644,8 +647,7 @@ class CustomGalleryState extends State<CustomGallery>
});
}

GestureDetector videoTabBar(Color blackColor,double widthOfScreen) {

GestureDetector videoTabBar(Color blackColor, double widthOfScreen) {
return GestureDetector(
onTap: () {
setState(() {
Expand All @@ -662,8 +664,7 @@ class CustomGalleryState extends State<CustomGallery>
child: ValueListenableBuilder(
valueListenable: selectedVideo,
builder: (context, bool selectedVideoValue, child) => Center(
child: Text(
tapsNames.videoText,
child: Text(tapsNames.videoText,
style: TextStyle(
fontSize: 14,
color: selectedVideoValue ? blackColor : Colors.grey,
Expand Down
Loading