Skip to content

Commit

Permalink
Updated to working spinner
Browse files Browse the repository at this point in the history
...but still pulling static profile pic from Google instead of
using asset images
  • Loading branch information
tvolkert committed Dec 28, 2022
1 parent ce09216 commit 0d80122
Show file tree
Hide file tree
Showing 47 changed files with 2,283 additions and 353 deletions.
3 changes: 3 additions & 0 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ migration:
- platform: android
create_revision: daa2ecf16534b286b7365d5c84554516b89cfd80
base_revision: daa2ecf16534b286b7365d5c84554516b89cfd80
- platform: macos
create_revision: daa2ecf16534b286b7365d5c84554516b89cfd80
base_revision: daa2ecf16534b286b7365d5c84554516b89cfd80

# User provided section

Expand Down
Binary file added assets/DSC_0013.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/DSC_0021-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/DSC_0135-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/DSC_0256.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/IMG_20150220_174328408_HDR.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Image13.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/P1010073.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/TCV_7314.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/TCV_8294.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import 'package:flutter/material.dart';
import 'package:photos/src/model/app.dart';
import 'package:scoped_model/scoped_model.dart';

import 'src/model/photo_cards.dart';
import 'src/model/photo_producer.dart';
import 'src/model/photos_library_api_model.dart';
import 'src/pages/home_page.dart';

Expand All @@ -24,10 +22,6 @@ Future<void> run({required bool interactive}) async {
model: apiModel,
child: HomePage(
interactive: interactive,
montageBuilder: () => PhotoMontage(),
producerBuilder: (PhotosLibraryApiModel model, PhotoMontage montage) {
return PhotoCardProducer(model, montage);
},
),
),
),
Expand Down
11 changes: 8 additions & 3 deletions lib/src/model/photo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ class Photo {

/// The Google Photos API representation of this photo.
///
/// This will only be set for photos that are backed by Google Photos.
/// Sometimes, the app will create photos from assets that are statically
/// bundled with the app (e.g. in the case of network errors), and for these
/// photos, this field will be null.
///
/// See also:
///
/// * <https://developers.google.com/photos/library/reference/rest/v1/mediaItems#MediaItem>
final MediaItem mediaItem;
final MediaItem? mediaItem;

/// The size in logical pixels of the photo.
///
Expand Down Expand Up @@ -46,14 +51,14 @@ class Photo {
final Uint8List bytes;

@override
int get hashCode => Object.hash(mediaItem.id, size);
int get hashCode => Object.hash(mediaItem?.id, size);

@override
bool operator ==(dynamic other) {
if (runtimeType != other.runtimeType) {
return false;
}
Photo typedOther = other;
return mediaItem.id == typedOther.mediaItem.id && size == typedOther.size;
return mediaItem?.id == typedOther.mediaItem?.id && size == typedOther.size;
}
}
162 changes: 0 additions & 162 deletions lib/src/model/photo_cards.dart

This file was deleted.

Loading

0 comments on commit 0d80122

Please sign in to comment.