Skip to content

Commit

Permalink
withOpacity deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
arifayduran committed Dec 11, 2024
1 parent 677c5cb commit 4421e19
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions lib/src/config/theme.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

const Color effectColorDark = black; // darkBlue
const Color effectColorDark = mainGrey; // darkBlue
const Color effectColorLight = mainBlue;
const Color destinationColorDark = mainGrey;
const Color destinationColorDark = black;
const Color destinationColorLight = white;
Color snackBarColorDark = effectColorDark.withOpacity(0.5);
Color snackBarColorLight = effectColorLight.withOpacity(0.5);
Color snackBarColorDark = effectColorDark.withValues(alpha: 0.5);
Color snackBarColorLight = effectColorLight.withValues(alpha: 0.5);

const Color white = Colors.white;
const Color black = Colors.black;
Expand Down
9 changes: 5 additions & 4 deletions lib/src/features/home/presentation/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class _HomeScreenState extends State<HomeScreen>
end: Alignment.topCenter,
colors: [
scrolledPlaceColor
// .withOpacity(0.0)
// .withValues(alpha:0.0)
,
Colors.transparent
],
Expand Down Expand Up @@ -334,9 +334,9 @@ class _HomeScreenState extends State<HomeScreen>
children: [
Positioned(
bottom:
-190, // bottom: -height - height + 150 + maxToolbarHeight,
-390, // bottom: -height - height + 150 + maxToolbarHeight,
child: Container(
height: 200, // height: height * 0.3,
height: 400, // height: height * 0.3,
width: width,
color: scrolledPlaceColor,
)),
Expand All @@ -349,7 +349,8 @@ class _HomeScreenState extends State<HomeScreen>
Padding(
padding: const EdgeInsets.all(8.0),
child: MyCustomButton(
text: "text", onPressed: () {}),
text: "csdcscsadvsdvsdvsdv",
onPressed: () {}),
),
TooltipAndSelectable(
isTooltip: true,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/widgets/animated_scroll_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class _AnimatedTextBodyState extends State<AnimatedTextBody> {
if (selectedIndex == index) {
return widget.hoverColor;
} else if (left == index || right == index) {
return widget.hoverColor.withOpacity(0.8);
return widget.hoverColor.withValues(alpha: .8);
} else {
return widget.initColor;
}
Expand Down

0 comments on commit 4421e19

Please sign in to comment.