mirror of
https://github.com/flutter/samples.git
synced 2026-04-07 04:02:13 +00:00
Remove hardcoded strings that were a workaround for raw string problem (#257)
This commit is contained in:
@@ -31,21 +31,12 @@ class _AboutDialog extends StatelessWidget {
|
|||||||
final legalese = '© 2019 The Flutter team'; // Don't need to localize.
|
final legalese = '© 2019 The Flutter team'; // Don't need to localize.
|
||||||
final samplesRepo =
|
final samplesRepo =
|
||||||
GalleryLocalizations.of(context).aboutFlutterSamplesRepo;
|
GalleryLocalizations.of(context).aboutFlutterSamplesRepo;
|
||||||
// TODO: Determine why this doesn't work consistently.
|
|
||||||
// Certain versions of iOS/macOS aren't rendering the raw string correctly.
|
|
||||||
final seeSource =
|
final seeSource =
|
||||||
GalleryLocalizations.of(context).aboutDialogDescription(samplesRepo);
|
GalleryLocalizations.of(context).aboutDialogDescription(samplesRepo);
|
||||||
final samplesRepoIndex = seeSource.indexOf(samplesRepo);
|
final samplesRepoIndex = seeSource.indexOf(samplesRepo);
|
||||||
final samplesRepoIndexEnd = samplesRepoIndex + samplesRepo.length;
|
final samplesRepoIndexEnd = samplesRepoIndex + samplesRepo.length;
|
||||||
String seeSourceFirst;
|
final seeSourceFirst = seeSource.substring(0, samplesRepoIndex);
|
||||||
String seeSourceSecond;
|
final seeSourceSecond = seeSource.substring(samplesRepoIndexEnd);
|
||||||
if (samplesRepoIndex > -1 && samplesRepoIndex > -1) {
|
|
||||||
seeSourceFirst = seeSource.substring(0, samplesRepoIndex);
|
|
||||||
seeSourceSecond = seeSource.substring(samplesRepoIndexEnd);
|
|
||||||
} else {
|
|
||||||
seeSourceFirst = 'To see the source code for this app, please visit the ';
|
|
||||||
seeSourceSecond = '.';
|
|
||||||
}
|
|
||||||
|
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
backgroundColor: colorScheme.background,
|
backgroundColor: colorScheme.background,
|
||||||
|
|||||||
Reference in New Issue
Block a user