mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
add thumbnails to the books example to make memory leaks easier to test (#1353)
* add thumbnails to the books example to make memory leaks easier to test
* also add profile build
* migrate material 3 demo code to avoid warning
* Revert "migrate material 3 demo code to avoid warning"
This reverts commit 7df37d9f65.
* fix lints in various packages
* DoNothingAndStopPropagationIntent const conflicts between stable and beta, add lint ignore for now
This commit is contained in:
@@ -17,9 +17,13 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
profile {
|
||||||
|
initWith debug
|
||||||
|
}
|
||||||
release {
|
release {
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
signingConfig debug.signingConfig
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
|
|||||||
@@ -94,6 +94,9 @@ class MainActivity : AppCompatActivity() {
|
|||||||
book.summary = volumeInfoJson.get("description").asString
|
book.summary = volumeInfoJson.get("description").asString
|
||||||
book.publishDate = volumeInfoJson.get("publishedDate").asString
|
book.publishDate = volumeInfoJson.get("publishedDate").asString
|
||||||
book.pageCount = volumeInfoJson.get("pageCount").asLong
|
book.pageCount = volumeInfoJson.get("pageCount").asLong
|
||||||
|
val thumbnail = Api.Thumbnail()
|
||||||
|
thumbnail.url = volumeInfoJson.getAsJsonObject("imageLinks").get("thumbnail").asString
|
||||||
|
book.thumbnail = thumbnail
|
||||||
books.add(book)
|
books.add(book)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
println("Failed to parse book:")
|
println("Failed to parse book:")
|
||||||
|
|||||||
@@ -96,6 +96,9 @@ class _BookDetailState extends State<BookDetail> {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Not overriding didUpdateWidget because the Android program can't change
|
||||||
|
// the book given to Flutter on the Android side.
|
||||||
|
|
||||||
void clear() {
|
void clear() {
|
||||||
book = null;
|
book = null;
|
||||||
// Keep focus if going to the home screen but unfocus if leaving
|
// Keep focus if going to the home screen but unfocus if leaving
|
||||||
@@ -209,21 +212,29 @@ class BookForm extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
const SizedBox(height: 32),
|
const SizedBox(height: 32),
|
||||||
const Center(
|
if (book.thumbnail?.url != null) ... [
|
||||||
child: Text(
|
Center(
|
||||||
'BOOK DESCRIPTION',
|
child: Image.network(book.thumbnail!.url!),
|
||||||
style: TextStyle(
|
),
|
||||||
fontSize: 15,
|
const SizedBox(height: 32),
|
||||||
fontWeight: FontWeight.bold,
|
],
|
||||||
decoration: TextDecoration.underline,
|
if (book.summary != null) ... [
|
||||||
|
const Center(
|
||||||
|
child: Text(
|
||||||
|
'BOOK DESCRIPTION',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 15,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
decoration: TextDecoration.underline,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 12),
|
||||||
const SizedBox(height: 12),
|
Text(
|
||||||
Text(
|
book.summary ?? '',
|
||||||
book.summary ?? '',
|
style: TextStyle(color: Colors.grey.shade600, height: 1.24),
|
||||||
style: TextStyle(color: Colors.grey.shade600, height: 1.24),
|
),
|
||||||
),
|
]
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
classes = {
|
classes = {
|
||||||
};
|
};
|
||||||
objectVersion = 51;
|
objectVersion = 50;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
0DDE4C3325E0390700389930 /* Sources */,
|
0DDE4C3325E0390700389930 /* Sources */,
|
||||||
0DDE4C3425E0390700389930 /* Frameworks */,
|
0DDE4C3425E0390700389930 /* Frameworks */,
|
||||||
0DDE4C3525E0390700389930 /* Resources */,
|
0DDE4C3525E0390700389930 /* Resources */,
|
||||||
F82F2089B06A5489DA98C8B9 /* [CP] Embed Pods Frameworks */,
|
CA4628050A0CDB5CBFD737AD /* [CP-User] Embed Flutter Build flutter_module_books Script */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
@@ -203,22 +203,15 @@
|
|||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "set -e\nset -u\nsource \"${SRCROOT}/../flutter_module_books/.ios/Flutter/flutter_export_environment.sh\"\nexport VERBOSE_SCRIPT_LOGGING=1 && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh build";
|
shellScript = "set -e\nset -u\nsource \"${SRCROOT}/../flutter_module_books/.ios/Flutter/flutter_export_environment.sh\"\nexport VERBOSE_SCRIPT_LOGGING=1 && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh build";
|
||||||
};
|
};
|
||||||
F82F2089B06A5489DA98C8B9 /* [CP] Embed Pods Frameworks */ = {
|
CA4628050A0CDB5CBFD737AD /* [CP-User] Embed Flutter Build flutter_module_books Script */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
inputFileListPaths = (
|
name = "[CP-User] Embed Flutter Build flutter_module_books Script";
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-IosBooks/Pods-IosBooks-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
|
||||||
);
|
|
||||||
name = "[CP] Embed Pods Frameworks";
|
|
||||||
outputFileListPaths = (
|
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-IosBooks/Pods-IosBooks-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-IosBooks/Pods-IosBooks-frameworks.sh\"\n";
|
shellScript = "set -e\nset -u\nsource \"${SRCROOT}/../flutter_module_books/.ios/Flutter/flutter_export_environment.sh\"\nexport VERBOSE_SCRIPT_LOGGING=1 && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh embed_and_thin";
|
||||||
showEnvVarsInLog = 0;
|
|
||||||
};
|
};
|
||||||
/* End PBXShellScriptBuildPhase section */
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
@@ -381,6 +374,7 @@
|
|||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
DEVELOPMENT_TEAM = "";
|
||||||
INFOPLIST_FILE = IosBooks/Info.plist;
|
INFOPLIST_FILE = IosBooks/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@@ -403,6 +397,7 @@
|
|||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
DEVELOPMENT_TEAM = "";
|
||||||
INFOPLIST_FILE = IosBooks/Info.plist;
|
INFOPLIST_FILE = IosBooks/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
|
|||||||
@@ -0,0 +1,78 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "1320"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "0DDE4C3625E0390700389930"
|
||||||
|
BuildableName = "IosBooks.app"
|
||||||
|
BlueprintName = "IosBooks"
|
||||||
|
ReferencedContainer = "container:IosBooks.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "0DDE4C3625E0390700389930"
|
||||||
|
BuildableName = "IosBooks.app"
|
||||||
|
BlueprintName = "IosBooks"
|
||||||
|
ReferencedContainer = "container:IosBooks.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "0DDE4C3625E0390700389930"
|
||||||
|
BuildableName = "IosBooks.app"
|
||||||
|
BlueprintName = "IosBooks"
|
||||||
|
ReferencedContainer = "container:IosBooks.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
@@ -47,7 +47,10 @@ class ViewController: UITableViewController, BKHostBookApi {
|
|||||||
let authors = (volumeInfo["authors"] as! [String]).joined(separator: " & ")
|
let authors = (volumeInfo["authors"] as! [String]).joined(separator: " & ")
|
||||||
let pageCount = volumeInfo["pageCount"] as! Int32
|
let pageCount = volumeInfo["pageCount"] as! Int32
|
||||||
let publishedDate = volumeInfo["publishedDate"] as! String
|
let publishedDate = volumeInfo["publishedDate"] as! String
|
||||||
let summary = volumeInfo["description"] as! String
|
let summary = volumeInfo["description"] as! String?
|
||||||
|
let imageLinks = volumeInfo["imageLinks"] as! [String: Any]
|
||||||
|
let thumbnail: BKThumbnail = BKThumbnail.init()
|
||||||
|
thumbnail.url = imageLinks["thumbnail"] as! String?
|
||||||
let book: BKBook = BKBook.init()
|
let book: BKBook = BKBook.init()
|
||||||
book.author = authors
|
book.author = authors
|
||||||
book.title = title
|
book.title = title
|
||||||
@@ -56,6 +59,7 @@ class ViewController: UITableViewController, BKHostBookApi {
|
|||||||
book.pageCount = NSNumber.init(value: pageCount)
|
book.pageCount = NSNumber.init(value: pageCount)
|
||||||
book.publishDate = publishedDate
|
book.publishDate = publishedDate
|
||||||
book.summary = summary
|
book.summary = summary
|
||||||
|
book.thumbnail = thumbnail
|
||||||
newBooks.append(book)
|
newBooks.append(book)
|
||||||
}
|
}
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
|
|||||||
@@ -34,7 +34,10 @@ class _HomePageState extends State<HomePage> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
style: TextButton.styleFrom(primary: Colors.white),
|
style: TextButton.styleFrom(
|
||||||
|
// ignore: deprecated_member_use
|
||||||
|
primary: Colors.white,
|
||||||
|
),
|
||||||
onPressed: () => _handleSignOut(),
|
onPressed: () => _handleSignOut(),
|
||||||
child: const Text('Sign Out'),
|
child: const Text('Sign Out'),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -27,7 +27,10 @@ class _FormValidationDemoState extends State<FormValidationDemo> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(8),
|
padding: const EdgeInsets.all(8),
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
style: TextButton.styleFrom(primary: Colors.white),
|
style: TextButton.styleFrom(
|
||||||
|
// ignore: deprecated_member_use
|
||||||
|
primary: Colors.white,
|
||||||
|
),
|
||||||
child: const Text('Submit'),
|
child: const Text('Submit'),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// Validate the form by getting the FormState from the GlobalKey
|
// Validate the form by getting the FormState from the GlobalKey
|
||||||
|
|||||||
@@ -114,8 +114,10 @@ class ButtonsWithoutIcon extends StatelessWidget {
|
|||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
// Foreground color
|
// Foreground color
|
||||||
|
// ignore: deprecated_member_use
|
||||||
onPrimary: Theme.of(context).colorScheme.onPrimary,
|
onPrimary: Theme.of(context).colorScheme.onPrimary,
|
||||||
// Background color
|
// Background color
|
||||||
|
// ignore: deprecated_member_use
|
||||||
primary: Theme.of(context).colorScheme.primary,
|
primary: Theme.of(context).colorScheme.primary,
|
||||||
).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)),
|
).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)),
|
||||||
onPressed: handlePressed(context, isDisabled, "FilledButton"),
|
onPressed: handlePressed(context, isDisabled, "FilledButton"),
|
||||||
@@ -125,8 +127,10 @@ class ButtonsWithoutIcon extends StatelessWidget {
|
|||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
// Foreground color
|
// Foreground color
|
||||||
|
// ignore: deprecated_member_use
|
||||||
onPrimary: Theme.of(context).colorScheme.onSecondaryContainer,
|
onPrimary: Theme.of(context).colorScheme.onSecondaryContainer,
|
||||||
// Background color
|
// Background color
|
||||||
|
// ignore: deprecated_member_use
|
||||||
primary: Theme.of(context).colorScheme.secondaryContainer,
|
primary: Theme.of(context).colorScheme.secondaryContainer,
|
||||||
).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)),
|
).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)),
|
||||||
onPressed: handlePressed(context, isDisabled, "FilledTonalButton"),
|
onPressed: handlePressed(context, isDisabled, "FilledTonalButton"),
|
||||||
@@ -166,8 +170,10 @@ class ButtonsWithIcon extends StatelessWidget {
|
|||||||
ElevatedButton.icon(
|
ElevatedButton.icon(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
// Foreground color
|
// Foreground color
|
||||||
|
// ignore: deprecated_member_use
|
||||||
onPrimary: Theme.of(context).colorScheme.onPrimary,
|
onPrimary: Theme.of(context).colorScheme.onPrimary,
|
||||||
// Background color
|
// Background color
|
||||||
|
// ignore: deprecated_member_use
|
||||||
primary: Theme.of(context).colorScheme.primary,
|
primary: Theme.of(context).colorScheme.primary,
|
||||||
).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)),
|
).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)),
|
||||||
onPressed: handlePressed(context, false, "FilledButton with Icon"),
|
onPressed: handlePressed(context, false, "FilledButton with Icon"),
|
||||||
@@ -178,8 +184,10 @@ class ButtonsWithIcon extends StatelessWidget {
|
|||||||
ElevatedButton.icon(
|
ElevatedButton.icon(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
// Foreground color
|
// Foreground color
|
||||||
|
// ignore: deprecated_member_use
|
||||||
onPrimary: Theme.of(context).colorScheme.onSecondaryContainer,
|
onPrimary: Theme.of(context).colorScheme.onSecondaryContainer,
|
||||||
// Background color
|
// Background color
|
||||||
|
// ignore: deprecated_member_use
|
||||||
primary: Theme.of(context).colorScheme.secondaryContainer,
|
primary: Theme.of(context).colorScheme.secondaryContainer,
|
||||||
).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)),
|
).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)),
|
||||||
onPressed:
|
onPressed:
|
||||||
|
|||||||
@@ -469,7 +469,10 @@ class _AddPlaceButtonBar extends StatelessWidget {
|
|||||||
alignment: MainAxisAlignment.center,
|
alignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(primary: Colors.blue),
|
style: ElevatedButton.styleFrom(
|
||||||
|
// ignore: deprecated_member_use
|
||||||
|
primary: Colors.blue,
|
||||||
|
),
|
||||||
onPressed: onSavePressed,
|
onPressed: onSavePressed,
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'Save',
|
'Save',
|
||||||
@@ -477,7 +480,10 @@ class _AddPlaceButtonBar extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(primary: Colors.red),
|
style: ElevatedButton.styleFrom(
|
||||||
|
// ignore: deprecated_member_use
|
||||||
|
primary: Colors.red,
|
||||||
|
),
|
||||||
onPressed: onCancelPressed,
|
onPressed: onCancelPressed,
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'Cancel',
|
'Cancel',
|
||||||
@@ -514,9 +520,11 @@ class _CategoryButtonBar extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
primary: selectedPlaceCategory == PlaceCategory.favorite
|
// ignore: deprecated_member_use
|
||||||
? Colors.green[700]
|
primary: selectedPlaceCategory == PlaceCategory.favorite
|
||||||
: Colors.lightGreen),
|
? Colors.green[700]
|
||||||
|
: Colors.lightGreen,
|
||||||
|
),
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'Favorites',
|
'Favorites',
|
||||||
style: TextStyle(color: Colors.white, fontSize: 14.0),
|
style: TextStyle(color: Colors.white, fontSize: 14.0),
|
||||||
@@ -525,9 +533,11 @@ class _CategoryButtonBar extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
primary: selectedPlaceCategory == PlaceCategory.visited
|
// ignore: deprecated_member_use
|
||||||
? Colors.green[700]
|
primary: selectedPlaceCategory == PlaceCategory.visited
|
||||||
: Colors.lightGreen),
|
? Colors.green[700]
|
||||||
|
: Colors.lightGreen,
|
||||||
|
),
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'Visited',
|
'Visited',
|
||||||
style: TextStyle(color: Colors.white, fontSize: 14.0),
|
style: TextStyle(color: Colors.white, fontSize: 14.0),
|
||||||
@@ -536,9 +546,11 @@ class _CategoryButtonBar extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
primary: selectedPlaceCategory == PlaceCategory.wantToGo
|
// ignore: deprecated_member_use
|
||||||
? Colors.green[700]
|
primary: selectedPlaceCategory == PlaceCategory.wantToGo
|
||||||
: Colors.lightGreen),
|
? Colors.green[700]
|
||||||
|
: Colors.lightGreen,
|
||||||
|
),
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'Want To Go',
|
'Want To Go',
|
||||||
style: TextStyle(color: Colors.white, fontSize: 14.0),
|
style: TextStyle(color: Colors.white, fontSize: 14.0),
|
||||||
|
|||||||
@@ -90,7 +90,10 @@ class _CartTotal extends StatelessWidget {
|
|||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
const SnackBar(content: Text('Buying not supported yet.')));
|
const SnackBar(content: Text('Buying not supported yet.')));
|
||||||
},
|
},
|
||||||
style: TextButton.styleFrom(primary: Colors.white),
|
style: TextButton.styleFrom(
|
||||||
|
// ignore: deprecated_member_use
|
||||||
|
primary: Colors.white,
|
||||||
|
),
|
||||||
child: const Text('BUY'),
|
child: const Text('BUY'),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ class MyLogin extends StatelessWidget {
|
|||||||
Navigator.pushReplacementNamed(context, '/catalog');
|
Navigator.pushReplacementNamed(context, '/catalog');
|
||||||
},
|
},
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
|
// ignore: deprecated_member_use
|
||||||
primary: Colors.yellow,
|
primary: Colors.yellow,
|
||||||
),
|
),
|
||||||
child: const Text('ENTER'),
|
child: const Text('ENTER'),
|
||||||
|
|||||||
@@ -697,16 +697,21 @@ class BasicTextInputClientState extends State<BasicTextInputClient>
|
|||||||
<ShortcutActivator, Intent>{
|
<ShortcutActivator, Intent>{
|
||||||
// Activation
|
// Activation
|
||||||
const SingleActivator(LogicalKeyboardKey.space):
|
const SingleActivator(LogicalKeyboardKey.space):
|
||||||
|
// ignore: prefer_const_constructors
|
||||||
DoNothingAndStopPropagationIntent(),
|
DoNothingAndStopPropagationIntent(),
|
||||||
|
|
||||||
// Scrolling
|
// Scrolling
|
||||||
const SingleActivator(LogicalKeyboardKey.arrowUp):
|
const SingleActivator(LogicalKeyboardKey.arrowUp):
|
||||||
|
// ignore: prefer_const_constructors
|
||||||
DoNothingAndStopPropagationIntent(),
|
DoNothingAndStopPropagationIntent(),
|
||||||
const SingleActivator(LogicalKeyboardKey.arrowDown):
|
const SingleActivator(LogicalKeyboardKey.arrowDown):
|
||||||
|
// ignore: prefer_const_constructors
|
||||||
DoNothingAndStopPropagationIntent(),
|
DoNothingAndStopPropagationIntent(),
|
||||||
const SingleActivator(LogicalKeyboardKey.arrowLeft):
|
const SingleActivator(LogicalKeyboardKey.arrowLeft):
|
||||||
|
// ignore: prefer_const_constructors
|
||||||
DoNothingAndStopPropagationIntent(),
|
DoNothingAndStopPropagationIntent(),
|
||||||
const SingleActivator(LogicalKeyboardKey.arrowRight):
|
const SingleActivator(LogicalKeyboardKey.arrowRight):
|
||||||
|
// ignore: prefer_const_constructors
|
||||||
DoNothingAndStopPropagationIntent(),
|
DoNothingAndStopPropagationIntent(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user