Benjamin Arhen
3 years ago
35 changed files with 1544 additions and 806 deletions
Binary file not shown.
@ -1,66 +1,72 @@ |
|||||
{ |
{ |
||||
"project_info": { |
"project_info": { |
||||
"project_number": "280510379185", |
"project_number": "280510379185", |
||||
"firebase_url": "https://teso-ghana-default-rtdb.firebaseio.com", |
"firebase_url": "https://teso-ghana-default-rtdb.firebaseio.com", |
||||
"project_id": "teso-ghana", |
"project_id": "teso-ghana", |
||||
"storage_bucket": "teso-ghana.appspot.com" |
"storage_bucket": "teso-ghana.appspot.com" |
||||
}, |
}, |
||||
"client": [{ |
"client": [ |
||||
"client_info": { |
{ |
||||
"mobilesdk_app_id": "1:280510379185:android:b778de8dca1cf49219de90", |
"client_info": { |
||||
"android_client_info": { |
"mobilesdk_app_id": "1:280510379185:android:b778de8dca1cf49219de90", |
||||
"package_name": "com.sparentechBacware.teso" |
"android_client_info": { |
||||
} |
"package_name": "com.sparentechBacware.teso" |
||||
|
} |
||||
|
}, |
||||
|
"oauth_client": [ |
||||
|
{ |
||||
|
"client_id": "280510379185-0shp8sia3i5m589bov645t3kuddb1032.apps.googleusercontent.com", |
||||
|
"client_type": 1, |
||||
|
"android_info": { |
||||
|
"package_name": "com.sparentechBacware.teso", |
||||
|
"certificate_hash": "40b68890dd51d72454ccdc7289623c4d56273248" |
||||
|
} |
||||
}, |
}, |
||||
"oauth_client": [{ |
{ |
||||
"client_id": "280510379185-0shp8sia3i5m589bov645t3kuddb1032.apps.googleusercontent.com", |
"client_id": "280510379185-87k85sksrd30mu9fjgfmacb3bkcjnmdq.apps.googleusercontent.com", |
||||
"client_type": 1, |
"client_type": 1, |
||||
"android_info": { |
"android_info": { |
||||
"package_name": "com.sparentechBacware.teso", |
"package_name": "com.sparentechBacware.teso", |
||||
"certificate_hash": "40b68890dd51d72454ccdc7289623c4d56273248" |
"certificate_hash": "4f655cf94cd94864838475611b711c2528e33601" |
||||
} |
} |
||||
}, |
}, |
||||
{ |
{ |
||||
"client_id": "280510379185-87k85sksrd30mu9fjgfmacb3bkcjnmdq.apps.googleusercontent.com", |
"client_id": "280510379185-ac7qjglm9cct9u0diqrns6om8t2mb9ug.apps.googleusercontent.com", |
||||
"client_type": 1, |
"client_type": 1, |
||||
"android_info": { |
"android_info": { |
||||
"package_name": "com.sparentechBacware.teso", |
"package_name": "com.sparentechBacware.teso", |
||||
"certificate_hash": "4f655cf94cd94864838475611b711c2528e33601" |
"certificate_hash": "063304c2da41f90c824fad163b5ad481edf6db11" |
||||
} |
} |
||||
}, |
}, |
||||
|
{ |
||||
|
"client_id": "280510379185-58chj1fi4pts4p7p7sieq16miapvtepi.apps.googleusercontent.com", |
||||
|
"client_type": 3 |
||||
|
} |
||||
|
], |
||||
|
"api_key": [ |
||||
|
{ |
||||
|
"current_key": "AIzaSyAHBguF6oqPEq7em1vLrh_NP2LoPuabe6o" |
||||
|
} |
||||
|
], |
||||
|
"services": { |
||||
|
"appinvite_service": { |
||||
|
"other_platform_oauth_client": [ |
||||
{ |
{ |
||||
"client_id": "280510379185-ac7qjglm9cct9u0diqrns6om8t2mb9ug.apps.googleusercontent.com", |
"client_id": "280510379185-58chj1fi4pts4p7p7sieq16miapvtepi.apps.googleusercontent.com", |
||||
"client_type": 1, |
"client_type": 3 |
||||
"android_info": { |
|
||||
"package_name": "com.sparentechBacware.teso", |
|
||||
"certificate_hash": "063304c2da41f90c824fad163b5ad481edf6db11" |
|
||||
} |
|
||||
}, |
}, |
||||
{ |
{ |
||||
"client_id": "280510379185-58chj1fi4pts4p7p7sieq16miapvtepi.apps.googleusercontent.com", |
"client_id": "280510379185-67vianhh973klriv75ip2tb9cf8ibitl.apps.googleusercontent.com", |
||||
"client_type": 3 |
"client_type": 2, |
||||
} |
"ios_info": { |
||||
], |
"bundle_id": "com.tesoapp", |
||||
"api_key": [{ |
"app_store_id": "1573175173" |
||||
"current_key": "AIzaSyAHBguF6oqPEq7em1vLrh_NP2LoPuabe6o" |
} |
||||
}], |
|
||||
"services": { |
|
||||
"appinvite_service": { |
|
||||
"other_platform_oauth_client": [{ |
|
||||
"client_id": "280510379185-58chj1fi4pts4p7p7sieq16miapvtepi.apps.googleusercontent.com", |
|
||||
"client_type": 3 |
|
||||
}, |
|
||||
{ |
|
||||
"client_id": "280510379185-67vianhh973klriv75ip2tb9cf8ibitl.apps.googleusercontent.com", |
|
||||
"client_type": 2, |
|
||||
"ios_info": { |
|
||||
"bundle_id": "com.tesoapp", |
|
||||
"app_store_id": "1573175173" |
|
||||
} |
|
||||
} |
|
||||
] |
|
||||
} |
} |
||||
|
] |
||||
} |
} |
||||
}], |
} |
||||
"configuration_version": "1" |
} |
||||
|
], |
||||
|
"configuration_version": "1" |
||||
} |
} |
Binary file not shown.
File diff suppressed because it is too large
Binary file not shown.
@ -1,127 +1,108 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
||||
<plist version="1.0"> |
<plist version="1.0"> |
||||
<dict> |
<dict> |
||||
<key>BGTaskSchedulerPermittedIdentifiers</key> |
<key>BGTaskSchedulerPermittedIdentifiers</key> |
||||
<array> |
<array> |
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> |
|
||||
</array> |
|
||||
<key>CFBundleDevelopmentRegion</key> |
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string> |
|
||||
<key>CFBundleDisplayName</key> |
|
||||
<string>Teso</string> |
|
||||
<key>CFBundleExecutable</key> |
|
||||
<string>$(EXECUTABLE_NAME)</string> |
|
||||
<key>CFBundleIdentifier</key> |
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> |
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> |
||||
<key>CFBundleInfoDictionaryVersion</key> |
</array> |
||||
<string>6.0</string> |
<key>CADisableMinimumFrameDurationOnPhone</key> |
||||
<key>CFBundleName</key> |
<true/> |
||||
<string>teso</string> |
<key>CFBundleDevelopmentRegion</key> |
||||
<key>CFBundlePackageType</key> |
<string>$(DEVELOPMENT_LANGUAGE)</string> |
||||
<string>APPL</string> |
<key>CFBundleDisplayName</key> |
||||
<key>CFBundleShortVersionString</key> |
<string>Teso</string> |
||||
<string>$(MARKETING_VERSION)</string> |
<key>CFBundleExecutable</key> |
||||
<key>CFBundleSignature</key> |
<string>$(EXECUTABLE_NAME)</string> |
||||
<string>????</string> |
<key>CFBundleIdentifier</key> |
||||
<key>CFBundleURLTypes</key> |
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> |
||||
<array> |
<key>CFBundleInfoDictionaryVersion</key> |
||||
<dict> |
<string>6.0</string> |
||||
<key>CFBundleTypeRole</key> |
<key>CFBundleName</key> |
||||
<string>Editor</string> |
<string>teso</string> |
||||
<key>CFBundleURLSchemes</key> |
<key>CFBundlePackageType</key> |
||||
<array> |
<string>APPL</string> |
||||
<string>com.googleusercontent.apps.280510379185-67vianhh973klriv75ip2tb9cf8ibitl</string> |
<key>CFBundleShortVersionString</key> |
||||
<string>fb1759156777594606</string> |
<string>$(MARKETING_VERSION)</string> |
||||
</array> |
<key>CFBundleSignature</key> |
||||
</dict> |
<string>????</string> |
||||
</array> |
<key>CFBundleURLTypes</key> |
||||
<key>CFBundleVersion</key> |
<array> |
||||
<string>$(CURRENT_PROJECT_VERSION)</string> |
|
||||
<key>LSApplicationQueriesSchemes</key> |
|
||||
<array> |
|
||||
<string>fbapi</string> |
|
||||
<string>fbapi20130214</string> |
|
||||
<string>fbapi20130410</string> |
|
||||
<string>fbapi20130702</string> |
|
||||
<string>fbapi20131010</string> |
|
||||
<string>fbapi20131219</string> |
|
||||
<string>fbapi20140410</string> |
|
||||
<string>fbapi20140116</string> |
|
||||
<string>fbapi20150313</string> |
|
||||
<string>fbapi20150629</string> |
|
||||
<string>fbapi20160328</string> |
|
||||
<string>fbauth</string> |
|
||||
<string>fb-messenger-share-api</string> |
|
||||
<string>fbauth2</string> |
|
||||
<string>fbshareextension</string> |
|
||||
</array> |
|
||||
<key>LSRequiresIPhoneOS</key> |
|
||||
<true /> |
|
||||
<key>NSAppTransportSecurity</key> |
|
||||
<dict> |
<dict> |
||||
<key>NSAllowsArbitraryLoads</key> |
<key>CFBundleTypeRole</key> |
||||
<true /> |
<string>Editor</string> |
||||
<key>NSAllowsArbitraryLoadsInWebContent</key> |
<key>CFBundleURLSchemes</key> |
||||
<true /> |
<array> |
||||
|
<string>com.googleusercontent.apps.280510379185-67vianhh973klriv75ip2tb9cf8ibitl</string> |
||||
|
<string>fb1759156777594606</string> |
||||
|
</array> |
||||
</dict> |
</dict> |
||||
<key>NSCameraUsageDescription</key> |
</array> |
||||
<string>This app needs camera access to scan QR codes and capture photos</string> |
<key>CFBundleVersion</key> |
||||
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key> |
<string>$(CURRENT_PROJECT_VERSION)</string> |
||||
<string>Teso needs access to location.</string> |
<key>FUAllFilesUploadedMessage</key> |
||||
<key>NSLocationAlwaysUsageDescription</key> |
<string>Posts successfully published on Teso</string> |
||||
<string>Teso needs access to location.</string> |
<key>FUMaximumConnectionsPerHost</key> |
||||
<key>NSLocationWhenInUseUsageDescription</key> |
<integer>5</integer> |
||||
<string>Teso needs access to location.</string> |
<key>FUMaximumUploadOperation</key> |
||||
<key>NSMicrophoneUsageDescription</key> |
<integer>5</integer> |
||||
<string>Allow access to microphone</string> |
<key>FUTimeoutInSeconds</key> |
||||
<key>NSPhotoLibraryAddUsageDescription</key> |
<integer>3600</integer> |
||||
<string>Teso needs permission to write videos and photos</string> |
<key>LSApplicationQueriesSchemes</key> |
||||
<key>NSPhotoLibraryUsageDescription</key> |
<array> |
||||
<string>Teso needs permission to select videos and photos</string> |
<string>https</string> |
||||
<key>UIBackgroundModes</key> |
<string>http</string> |
||||
<array> |
</array> |
||||
<string>fetch</string> |
<key>LSRequiresIPhoneOS</key> |
||||
<string>location</string> |
<true/> |
||||
<string>processing</string> |
<key>NSAppTransportSecurity</key> |
||||
<string>remote-notification</string> |
<dict> |
||||
</array> |
<key>NSAllowsArbitraryLoads</key> |
||||
<key>UILaunchStoryboardName</key> |
<true/> |
||||
<string>LaunchScreen</string> |
<key>NSAllowsArbitraryLoadsInWebContent</key> |
||||
<key>UIMainStoryboardFile</key> |
<true/> |
||||
<string>Main</string> |
|
||||
<key>UISupportedInterfaceOrientations</key> |
|
||||
<array> |
|
||||
<string>UIInterfaceOrientationPortrait</string> |
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string> |
|
||||
<string>UIInterfaceOrientationLandscapeRight</string> |
|
||||
</array> |
|
||||
<key>UISupportedInterfaceOrientations~ipad</key> |
|
||||
<array> |
|
||||
<string>UIInterfaceOrientationPortrait</string> |
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string> |
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string> |
|
||||
<string>UIInterfaceOrientationLandscapeRight</string> |
|
||||
</array> |
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key> |
|
||||
<false /> |
|
||||
<key>io.flutter.embedded_views_preview</key> |
|
||||
<true /> |
|
||||
<!-- changes this number to configure the maximum number of concurrent tasks --> |
|
||||
<key>FUMaximumConnectionsPerHost</key> |
|
||||
<integer>5</integer> |
|
||||
<!-- changes this number to configure the maximum number of concurrent tasks --> |
|
||||
<key>FUMaximumUploadOperation</key> |
|
||||
<integer>5</integer> |
|
||||
<!-- changes this number to configure the request timeout --> |
|
||||
<key>FUTimeoutInSeconds</key> |
|
||||
<integer>3600</integer> |
|
||||
<key>FUAllFilesUploadedMessage</key> |
|
||||
<string>Posts successfully published on Teso</string> |
|
||||
<key>LSApplicationQueriesSchemes</key> |
|
||||
<array> |
|
||||
<string>https</string> |
|
||||
<string>http</string> |
|
||||
</array> |
|
||||
</dict> |
</dict> |
||||
</plist> |
<key>NSCameraUsageDescription</key> |
||||
|
<string>This app needs camera access to scan QR codes and capture photos</string> |
||||
|
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key> |
||||
|
<string>Teso needs access to location.</string> |
||||
|
<key>NSLocationAlwaysUsageDescription</key> |
||||
|
<string>Teso needs access to location.</string> |
||||
|
<key>NSLocationWhenInUseUsageDescription</key> |
||||
|
<string>Teso needs access to location.</string> |
||||
|
<key>NSMicrophoneUsageDescription</key> |
||||
|
<string>Allow access to microphone</string> |
||||
|
<key>NSPhotoLibraryAddUsageDescription</key> |
||||
|
<string>Teso needs permission to write videos and photos</string> |
||||
|
<key>NSPhotoLibraryUsageDescription</key> |
||||
|
<string>Teso needs permission to select videos and photos</string> |
||||
|
<key>UIBackgroundModes</key> |
||||
|
<array> |
||||
|
<string>fetch</string> |
||||
|
<string>location</string> |
||||
|
<string>processing</string> |
||||
|
<string>remote-notification</string> |
||||
|
</array> |
||||
|
<key>UILaunchStoryboardName</key> |
||||
|
<string>LaunchScreen</string> |
||||
|
<key>UIMainStoryboardFile</key> |
||||
|
<string>Main</string> |
||||
|
<key>UISupportedInterfaceOrientations</key> |
||||
|
<array> |
||||
|
<string>UIInterfaceOrientationPortrait</string> |
||||
|
<string>UIInterfaceOrientationLandscapeLeft</string> |
||||
|
<string>UIInterfaceOrientationLandscapeRight</string> |
||||
|
</array> |
||||
|
<key>UISupportedInterfaceOrientations~ipad</key> |
||||
|
<array> |
||||
|
<string>UIInterfaceOrientationPortrait</string> |
||||
|
<string>UIInterfaceOrientationPortraitUpsideDown</string> |
||||
|
<string>UIInterfaceOrientationLandscapeLeft</string> |
||||
|
<string>UIInterfaceOrientationLandscapeRight</string> |
||||
|
</array> |
||||
|
<key>UIViewControllerBasedStatusBarAppearance</key> |
||||
|
<false/> |
||||
|
<key>io.flutter.embedded_views_preview</key> |
||||
|
<true/> |
||||
|
</dict> |
||||
|
</plist> |
||||
|
@ -0,0 +1,7 @@ |
|||||
|
{ |
||||
|
"file_generated_by": "FlutterFire CLI", |
||||
|
"purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", |
||||
|
"GOOGLE_APP_ID": "1:280510379185:ios:52af12a619d5443119de90", |
||||
|
"FIREBASE_PROJECT_ID": "teso-ghana", |
||||
|
"GCM_SENDER_ID": "280510379185" |
||||
|
} |
@ -0,0 +1,72 @@ |
|||||
|
// File generated by FlutterFire CLI. |
||||
|
// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members |
||||
|
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; |
||||
|
import 'package:flutter/foundation.dart' |
||||
|
show defaultTargetPlatform, kIsWeb, TargetPlatform; |
||||
|
|
||||
|
/// Default [FirebaseOptions] for use with your Firebase apps. |
||||
|
/// |
||||
|
/// Example: |
||||
|
/// ```dart |
||||
|
/// import 'firebase_options.dart'; |
||||
|
/// // ... |
||||
|
/// await Firebase.initializeApp( |
||||
|
/// options: DefaultFirebaseOptions.currentPlatform, |
||||
|
/// ); |
||||
|
/// ``` |
||||
|
class DefaultFirebaseOptions { |
||||
|
static FirebaseOptions get currentPlatform { |
||||
|
if (kIsWeb) { |
||||
|
throw UnsupportedError( |
||||
|
'DefaultFirebaseOptions have not been configured for web - ' |
||||
|
'you can reconfigure this by running the FlutterFire CLI again.', |
||||
|
); |
||||
|
} |
||||
|
switch (defaultTargetPlatform) { |
||||
|
case TargetPlatform.android: |
||||
|
return android; |
||||
|
case TargetPlatform.iOS: |
||||
|
return ios; |
||||
|
case TargetPlatform.macOS: |
||||
|
throw UnsupportedError( |
||||
|
'DefaultFirebaseOptions have not been configured for macos - ' |
||||
|
'you can reconfigure this by running the FlutterFire CLI again.', |
||||
|
); |
||||
|
case TargetPlatform.windows: |
||||
|
throw UnsupportedError( |
||||
|
'DefaultFirebaseOptions have not been configured for windows - ' |
||||
|
'you can reconfigure this by running the FlutterFire CLI again.', |
||||
|
); |
||||
|
case TargetPlatform.linux: |
||||
|
throw UnsupportedError( |
||||
|
'DefaultFirebaseOptions have not been configured for linux - ' |
||||
|
'you can reconfigure this by running the FlutterFire CLI again.', |
||||
|
); |
||||
|
default: |
||||
|
throw UnsupportedError( |
||||
|
'DefaultFirebaseOptions are not supported for this platform.', |
||||
|
); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
static const FirebaseOptions android = FirebaseOptions( |
||||
|
apiKey: 'AIzaSyAHBguF6oqPEq7em1vLrh_NP2LoPuabe6o', |
||||
|
appId: '1:280510379185:android:b778de8dca1cf49219de90', |
||||
|
messagingSenderId: '280510379185', |
||||
|
projectId: 'teso-ghana', |
||||
|
databaseURL: 'https://teso-ghana-default-rtdb.firebaseio.com', |
||||
|
storageBucket: 'teso-ghana.appspot.com', |
||||
|
); |
||||
|
|
||||
|
static const FirebaseOptions ios = FirebaseOptions( |
||||
|
apiKey: 'AIzaSyCBDtZO2_Z5JjrNj1TocK6YAlk_wDbzZHs', |
||||
|
appId: '1:280510379185:ios:52af12a619d5443119de90', |
||||
|
messagingSenderId: '280510379185', |
||||
|
projectId: 'teso-ghana', |
||||
|
databaseURL: 'https://teso-ghana-default-rtdb.firebaseio.com', |
||||
|
storageBucket: 'teso-ghana.appspot.com', |
||||
|
androidClientId: '280510379185-0shp8sia3i5m589bov645t3kuddb1032.apps.googleusercontent.com', |
||||
|
iosClientId: '280510379185-67vianhh973klriv75ip2tb9cf8ibitl.apps.googleusercontent.com', |
||||
|
iosBundleId: 'com.tesoapp', |
||||
|
); |
||||
|
} |
@ -0,0 +1,232 @@ |
|||||
|
// import 'dart:math' as math; |
||||
|
// import 'package:flutter/material.dart'; |
||||
|
|
||||
|
// @immutable |
||||
|
// class ExpandableFab extends StatefulWidget { |
||||
|
// const ExpandableFab({ |
||||
|
// super.key, |
||||
|
// this.initialOpen, |
||||
|
// required this.distance, |
||||
|
// required this.children, |
||||
|
// }); |
||||
|
|
||||
|
// final bool? initialOpen; |
||||
|
// final double distance; |
||||
|
// final List<Widget> children; |
||||
|
|
||||
|
// @override |
||||
|
// _ExpandableFabState createState() => _ExpandableFabState(); |
||||
|
// } |
||||
|
|
||||
|
// class _ExpandableFabState extends State<ExpandableFab> |
||||
|
// with SingleTickerProviderStateMixin { |
||||
|
// late final AnimationController _controller; |
||||
|
// late final Animation<double> _expandAnimation; |
||||
|
// bool _open = false; |
||||
|
|
||||
|
// @override |
||||
|
// void initState() { |
||||
|
// super.initState(); |
||||
|
// _open = widget.initialOpen ?? false; |
||||
|
// _controller = AnimationController( |
||||
|
// value: _open ? 1.0 : 0.0, |
||||
|
// duration: const Duration(milliseconds: 250), |
||||
|
// vsync: this, |
||||
|
// ); |
||||
|
// _expandAnimation = CurvedAnimation( |
||||
|
// curve: Curves.fastOutSlowIn, |
||||
|
// reverseCurve: Curves.easeOutQuad, |
||||
|
// parent: _controller, |
||||
|
// ); |
||||
|
// } |
||||
|
|
||||
|
// @override |
||||
|
// void dispose() { |
||||
|
// _controller.dispose(); |
||||
|
// super.dispose(); |
||||
|
// } |
||||
|
|
||||
|
// void _toggle() { |
||||
|
// setState(() { |
||||
|
// _open = !_open; |
||||
|
// if (_open) { |
||||
|
// _controller.forward(); |
||||
|
// } else { |
||||
|
// _controller.reverse(); |
||||
|
// } |
||||
|
// }); |
||||
|
// } |
||||
|
|
||||
|
// @override |
||||
|
// Widget build(BuildContext context) { |
||||
|
// return SizedBox.expand( |
||||
|
// child: Stack( |
||||
|
// alignment: Alignment.bottomRight, |
||||
|
// clipBehavior: Clip.none, |
||||
|
// children: [ |
||||
|
// _buildTapToCloseFab(), |
||||
|
// ..._buildExpandingActionButtons(), |
||||
|
// _buildTapToOpenFab(), |
||||
|
// ], |
||||
|
// ), |
||||
|
// ); |
||||
|
// } |
||||
|
|
||||
|
// Widget _buildTapToCloseFab() { |
||||
|
// return SizedBox( |
||||
|
// width: 56.0, |
||||
|
// height: 56.0, |
||||
|
// child: Center( |
||||
|
// child: Material( |
||||
|
// shape: const CircleBorder(), |
||||
|
// clipBehavior: Clip.antiAlias, |
||||
|
// elevation: 4.0, |
||||
|
// child: InkWell( |
||||
|
// onTap: _toggle, |
||||
|
// child: Padding( |
||||
|
// padding: const EdgeInsets.all(8.0), |
||||
|
// child: Icon( |
||||
|
// Icons.close, |
||||
|
// color: Theme.of(context).primaryColor, |
||||
|
// ), |
||||
|
// ), |
||||
|
// ), |
||||
|
// ), |
||||
|
// ), |
||||
|
// ); |
||||
|
// } |
||||
|
|
||||
|
// List<Widget> _buildExpandingActionButtons() { |
||||
|
// final children = <Widget>[]; |
||||
|
// final count = widget.children.length; |
||||
|
// final step = 90.0 / (count - 1); |
||||
|
// for (var i = 0, angleInDegrees = 0.0; |
||||
|
// i < count; |
||||
|
// i++, angleInDegrees += step) { |
||||
|
// children.add( |
||||
|
// _ExpandingActionButton( |
||||
|
// directionInDegrees: angleInDegrees, |
||||
|
// maxDistance: widget.distance, |
||||
|
// progress: _expandAnimation, |
||||
|
// child: widget.children[i], |
||||
|
// ), |
||||
|
// ); |
||||
|
// } |
||||
|
// return children; |
||||
|
// } |
||||
|
|
||||
|
// Widget _buildTapToOpenFab() { |
||||
|
// return IgnorePointer( |
||||
|
// ignoring: _open, |
||||
|
// child: AnimatedContainer( |
||||
|
// transformAlignment: Alignment.center, |
||||
|
// transform: Matrix4.diagonal3Values( |
||||
|
// _open ? 0.7 : 1.0, |
||||
|
// _open ? 0.7 : 1.0, |
||||
|
// 1.0, |
||||
|
// ), |
||||
|
// duration: const Duration(milliseconds: 250), |
||||
|
// curve: const Interval(0.0, 0.5, curve: Curves.easeOut), |
||||
|
// child: AnimatedOpacity( |
||||
|
// opacity: _open ? 0.0 : 1.0, |
||||
|
// curve: const Interval(0.25, 1.0, curve: Curves.easeInOut), |
||||
|
// duration: const Duration(milliseconds: 250), |
||||
|
// child: FloatingActionButton( |
||||
|
// onPressed: _toggle, |
||||
|
// child: const Icon(Icons.create), |
||||
|
// ), |
||||
|
// ), |
||||
|
// ), |
||||
|
// ); |
||||
|
// } |
||||
|
// } |
||||
|
|
||||
|
// @immutable |
||||
|
// class _ExpandingActionButton extends StatelessWidget { |
||||
|
// const _ExpandingActionButton({ |
||||
|
// required this.directionInDegrees, |
||||
|
// required this.maxDistance, |
||||
|
// required this.progress, |
||||
|
// required this.child, |
||||
|
// }); |
||||
|
|
||||
|
// final double directionInDegrees; |
||||
|
// final double maxDistance; |
||||
|
// final Animation<double> progress; |
||||
|
// final Widget child; |
||||
|
|
||||
|
// @override |
||||
|
// Widget build(BuildContext context) { |
||||
|
// return AnimatedBuilder( |
||||
|
// animation: progress, |
||||
|
// builder: (context, child) { |
||||
|
// final offset = Offset.fromDirection( |
||||
|
// directionInDegrees * (math.pi / 180.0), |
||||
|
// progress.value * maxDistance, |
||||
|
// ); |
||||
|
// return Positioned( |
||||
|
// right: 4.0 + offset.dx, |
||||
|
// bottom: 4.0 + offset.dy, |
||||
|
// child: Transform.rotate( |
||||
|
// angle: (1.0 - progress.value) * math.pi / 2, |
||||
|
// child: child!, |
||||
|
// ), |
||||
|
// ); |
||||
|
// }, |
||||
|
// child: FadeTransition( |
||||
|
// opacity: progress, |
||||
|
// child: child, |
||||
|
// ), |
||||
|
// ); |
||||
|
// } |
||||
|
// } |
||||
|
|
||||
|
// @immutable |
||||
|
// class ActionButton extends StatelessWidget { |
||||
|
// const ActionButton({ |
||||
|
// super.key, |
||||
|
// this.onPressed, |
||||
|
// required this.icon, |
||||
|
// }); |
||||
|
|
||||
|
// final VoidCallback? onPressed; |
||||
|
// final Widget icon; |
||||
|
|
||||
|
// @override |
||||
|
// Widget build(BuildContext context) { |
||||
|
// final theme = Theme.of(context); |
||||
|
// return Material( |
||||
|
// shape: const CircleBorder(), |
||||
|
// clipBehavior: Clip.antiAlias, |
||||
|
// color: theme.colorScheme.secondary, |
||||
|
// elevation: 4.0, |
||||
|
// child: IconButton( |
||||
|
// onPressed: onPressed, |
||||
|
// icon: icon, |
||||
|
// color: theme.colorScheme.secondary, |
||||
|
// ), |
||||
|
// ); |
||||
|
// } |
||||
|
// } |
||||
|
|
||||
|
// @immutable |
||||
|
// class FakeItem extends StatelessWidget { |
||||
|
// const FakeItem({ |
||||
|
// super.key, |
||||
|
// required this.isBig, |
||||
|
// }); |
||||
|
|
||||
|
// final bool isBig; |
||||
|
|
||||
|
// @override |
||||
|
// Widget build(BuildContext context) { |
||||
|
// return Container( |
||||
|
// margin: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 24.0), |
||||
|
// height: isBig ? 128.0 : 36.0, |
||||
|
// decoration: BoxDecoration( |
||||
|
// borderRadius: const BorderRadius.all(Radius.circular(8.0)), |
||||
|
// color: Colors.grey.shade300, |
||||
|
// ), |
||||
|
// ); |
||||
|
// } |
||||
|
// } |
Loading…
Reference in new issue