View enum_with_generics.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Sample<T> { | |
hoge<int>(value: 0), | |
fuga<String>(value: 'I\'m fuga'), | |
withNull<int?>(value: null), | |
; | |
const Sample({required this.value}); | |
final T value; | |
} |
View error_snippet.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
... | |
... | |
... | |
[ ] executing: /usr/bin/arch -arm64e xcrun xcodebuild -exportArchive -allowProvisioningDeviceRegistration -allowProvisioningUpdates -archivePath /path/to/repo/build/ios/archive/Runner.xcarchive -exportPath /path/to/repo/build/ios/ipa -exportOptionsPlist /var/folders/w6/qxkr32dx1lldsm0_9zhlhsqm0000gn/T/flutter_tools.D1BNO4/flutter_build_ios.WdfAVw/ExportOptions.plist | |
[+14308 ms] ** EXPORT FAILED ** | |
2023-03-19 03:13:55.914 xcodebuild[87646:62234695] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path "/var/folders/w6/qxkr32dx1lldsm0_9zhlhsqm0000gn/T/Runner_2023-03-19_03-13-55.914.xcdistributionlogs". | |
error: exportArchive: Provisioning profile "iOS Team Store Provisioning Profile: $$${PRODUCT_BUNDLE_IDENTIFIER}" doesn't match the entitlements file's value for the application-identifier entitlement. |
View freezed_union_key.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// OK | |
@Freezed(unionKey: 'type') | |
class FlightPlan with _$FlightPlan { | |
factory FlightPlan.first({ | |
required String type, | |
required String monitorMaker, | |
required bool baggageDeliveryAvailable, | |
}) = FirstClassFlightPlan; | |
factory FlightPlan.economy({ |
View spacer_in_custom_scroll_view.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override |
View spacer_in_list_view.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override |
View after_override_with_value.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final valueProvider = Provider( | |
(ref) => 1, | |
); | |
void main() { | |
runApp( | |
ProviderScope( | |
overrides: [ | |
valueProvider.overrideWith( | |
(ref) => 2, |
View with_override_with_value.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final valueProvider = Provider( | |
(ref) => 1, | |
); | |
void main() { | |
runApp( | |
ProviderScope( | |
overrides: [ | |
valueProvider.overrideWithValue(2), | |
], |
View with_ref_repository.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final someRepositoryProvider = Provider( | |
(ref) => SomeRepository(ref.read), | |
); | |
class SomeRepository { | |
const SomeRepository(this._read); | |
final Ref _ref; | |
Future<void> fetch() async { |
View with_reader_repository.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final someRepositoryProvider = Provider(SomeRepository.new); | |
class SomeRepository { | |
const SomeRepository(this._read); | |
final Reader _read; | |
Future<void> fetch() async { | |
final response = _read(dioProvider).get(...); | |
// ... |
View bad_association_widget.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BadAssociationWidget extends StatelessWidget { | |
const BadAssociationWidget(); | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
margin: const EdgeInsets.symmetric(horizontal: 16), | |
child: Text('Hello with Margin'), | |
); | |
} |
NewerOlder