text
stringlengths
6
13.6M
id
stringlengths
13
176
metadata
dict
__index_level_0__
int64
0
1.69k
#include "../../Flutter/Flutter-Release.xcconfig" #include "Warnings.xcconfig"
codelabs/firebase-get-to-know-flutter/step_07/macos/Runner/Configs/Release.xcconfig/0
{ "file_path": "codelabs/firebase-get-to-know-flutter/step_07/macos/Runner/Configs/Release.xcconfig", "repo_id": "codelabs", "token_count": 32 }
100
// TODO: Replace with file generated by FlutterFire CLI. // ignore_for_file: lines_longer_than_80_chars 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) { return web; } switch (defaultTargetPlatform) { case TargetPlatform.android: return android; case TargetPlatform.iOS: return ios; case TargetPlatform.macOS: return macos; default: throw UnsupportedError( 'DefaultFirebaseOptions are not supported for this platform.'); } } static const FirebaseOptions web = FirebaseOptions( apiKey: '', appId: '', messagingSenderId: '', projectId: '', ); static const FirebaseOptions android = FirebaseOptions( apiKey: '', appId: '', messagingSenderId: '', projectId: '', ); static const FirebaseOptions ios = FirebaseOptions( apiKey: '', appId: '', messagingSenderId: '', projectId: '', ); static const FirebaseOptions macos = FirebaseOptions( apiKey: '', appId: '', messagingSenderId: '', projectId: '', ); }
codelabs/firebase-get-to-know-flutter/step_09/lib/firebase_options.dart/0
{ "file_path": "codelabs/firebase-get-to-know-flutter/step_09/lib/firebase_options.dart", "repo_id": "codelabs", "token_count": 561 }
101
<?xml version="1.0" encoding="UTF-8"?> <Workspace version = "1.0"> <FileRef location = "group:Runner.xcodeproj"> </FileRef> <FileRef location = "group:Pods/Pods.xcodeproj"> </FileRef> </Workspace>
codelabs/firebase-get-to-know-flutter/step_09/macos/Runner.xcworkspace/contents.xcworkspacedata/0
{ "file_path": "codelabs/firebase-get-to-know-flutter/step_09/macos/Runner.xcworkspace/contents.xcworkspacedata", "repo_id": "codelabs", "token_count": 103 }
102
// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. import 'package:flutter/material.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( // This is the theme of your application. // // TRY THIS: Try running your application with "flutter run". You'll see // the application has a purple toolbar. Then, without quitting the app, // try changing the seedColor in the colorScheme below to Colors.green // and then invoke "hot reload" (save your changes or press the "hot // reload" button in a Flutter-supported IDE, or press "r" if you used // the command line to start the app). // // Notice that the counter didn't reset back to zero; the application // state is not lost during the reload. To reset the state, use hot // restart instead. // // This works for code too, not just values: Most code changes can be // tested with just a hot reload. colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), home: const MyHomePage(title: 'Flutter Demo Home Page'), ); } } class MyHomePage extends StatefulWidget { const MyHomePage({super.key, required this.title}); // This widget is the home page of your application. It is stateful, meaning // that it has a State object (defined below) that contains fields that affect // how it looks. // This class is the configuration for the state. It holds the values (in this // case the title) provided by the parent (in this case the App widget) and // used by the build method of the State. Fields in a Widget subclass are // always marked "final". final String title; @override State<MyHomePage> createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { int _counter = 0; void _incrementCounter() { setState(() { // This call to setState tells the Flutter framework that something has // changed in this State, which causes it to rerun the build method below // so that the display can reflect the updated values. If we changed // _counter without calling setState(), then the build method would not be // called again, and so nothing would appear to happen. _counter++; }); } @override Widget build(BuildContext context) { // This method is rerun every time setState is called, for instance as done // by the _incrementCounter method above. // // The Flutter framework has been optimized to make rerunning build methods // fast, so that you can just rebuild anything that needs updating rather // than having to individually change instances of widgets. return Scaffold( appBar: AppBar( // TRY THIS: Try changing the color here to a specific color (to // Colors.amber, perhaps?) and trigger a hot reload to see the AppBar // change color while the other colors stay the same. backgroundColor: Theme.of(context).colorScheme.inversePrimary, // Here we take the value from the MyHomePage object that was created by // the App.build method, and use it to set our appbar title. title: Text(widget.title), ), body: Center( // Center is a layout widget. It takes a single child and positions it // in the middle of the parent. child: Column( // Column is also a layout widget. It takes a list of children and // arranges them vertically. By default, it sizes itself to fit its // children horizontally, and tries to be as tall as its parent. // // Column has various properties to control how it sizes itself and // how it positions its children. Here we use mainAxisAlignment to // center the children vertically; the main axis here is the vertical // axis because Columns are vertical (the cross axis would be // horizontal). // // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint" // action in the IDE, or press "p" in the console), to see the // wireframe for each widget. mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ const Text( 'You have pushed the button this many times:', ), Text( '$_counter', style: Theme.of(context).textTheme.headlineMedium, ), ], ), ), floatingActionButton: FloatingActionButton( onPressed: _incrementCounter, tooltip: 'Increment', child: const Icon(Icons.add), ), // This trailing comma makes auto-formatting nicer for build methods. ); } }
codelabs/github-client/step_03/lib/main.dart/0
{ "file_path": "codelabs/github-client/step_03/lib/main.dart", "repo_id": "codelabs", "token_count": 1874 }
103
// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. import 'package:flutter/material.dart'; import 'package:fluttericon/octicons_icons.dart'; import 'package:github/github.dart'; import 'package:url_launcher/url_launcher_string.dart'; class GitHubSummary extends StatefulWidget { const GitHubSummary({required this.gitHub, super.key}); final GitHub gitHub; @override State<GitHubSummary> createState() => _GitHubSummaryState(); } class _GitHubSummaryState extends State<GitHubSummary> { int _selectedIndex = 0; @override Widget build(BuildContext context) { return Row( children: [ NavigationRail( selectedIndex: _selectedIndex, onDestinationSelected: (index) { setState(() { _selectedIndex = index; }); }, labelType: NavigationRailLabelType.selected, destinations: const [ NavigationRailDestination( icon: Icon(Octicons.repo), label: Text('Repositories'), ), NavigationRailDestination( icon: Icon(Octicons.issue_opened), label: Text('Assigned Issues'), ), NavigationRailDestination( icon: Icon(Octicons.git_pull_request), label: Text('Pull Requests'), ), ], ), const VerticalDivider(thickness: 1, width: 1), // This is the main content. Expanded( child: IndexedStack( index: _selectedIndex, children: [ RepositoriesList(gitHub: widget.gitHub), AssignedIssuesList(gitHub: widget.gitHub), PullRequestsList(gitHub: widget.gitHub), ], ), ), ], ); } } class RepositoriesList extends StatefulWidget { const RepositoriesList({required this.gitHub, super.key}); final GitHub gitHub; @override State<RepositoriesList> createState() => _RepositoriesListState(); } class _RepositoriesListState extends State<RepositoriesList> { @override initState() { super.initState(); _repositories = widget.gitHub.repositories.listRepositories().toList(); } late Future<List<Repository>> _repositories; @override Widget build(BuildContext context) { return FutureBuilder<List<Repository>>( future: _repositories, builder: (context, snapshot) { if (snapshot.hasError) { return Center(child: Text('${snapshot.error}')); } if (!snapshot.hasData) { return const Center(child: CircularProgressIndicator()); } var repositories = snapshot.data; return ListView.builder( primary: false, itemBuilder: (context, index) { var repository = repositories[index]; return ListTile( title: Text('${repository.owner?.login ?? ''}/${repository.name}'), subtitle: Text(repository.description), onTap: () => _launchUrl(this, repository.htmlUrl), ); }, itemCount: repositories!.length, ); }, ); } } class AssignedIssuesList extends StatefulWidget { const AssignedIssuesList({required this.gitHub, super.key}); final GitHub gitHub; @override State<AssignedIssuesList> createState() => _AssignedIssuesListState(); } class _AssignedIssuesListState extends State<AssignedIssuesList> { @override initState() { super.initState(); _assignedIssues = widget.gitHub.issues.listByUser().toList(); } late Future<List<Issue>> _assignedIssues; @override Widget build(BuildContext context) { return FutureBuilder<List<Issue>>( future: _assignedIssues, builder: (context, snapshot) { if (snapshot.hasError) { return Center(child: Text('${snapshot.error}')); } if (!snapshot.hasData) { return const Center(child: CircularProgressIndicator()); } var assignedIssues = snapshot.data; return ListView.builder( primary: false, itemBuilder: (context, index) { var assignedIssue = assignedIssues[index]; return ListTile( title: Text(assignedIssue.title), subtitle: Text('${_nameWithOwner(assignedIssue)} ' 'Issue #${assignedIssue.number} ' 'opened by ${assignedIssue.user?.login ?? ''}'), onTap: () => _launchUrl(this, assignedIssue.htmlUrl), ); }, itemCount: assignedIssues!.length, ); }, ); } String _nameWithOwner(Issue assignedIssue) { final endIndex = assignedIssue.url.lastIndexOf('/issues/'); return assignedIssue.url.substring(29, endIndex); } } class PullRequestsList extends StatefulWidget { const PullRequestsList({required this.gitHub, super.key}); final GitHub gitHub; @override State<PullRequestsList> createState() => _PullRequestsListState(); } class _PullRequestsListState extends State<PullRequestsList> { @override initState() { super.initState(); _pullRequests = widget.gitHub.pullRequests .list(RepositorySlug('flutter', 'flutter')) .toList(); } late Future<List<PullRequest>> _pullRequests; @override Widget build(BuildContext context) { return FutureBuilder<List<PullRequest>>( future: _pullRequests, builder: (context, snapshot) { if (snapshot.hasError) { return Center(child: Text('${snapshot.error}')); } if (!snapshot.hasData) { return const Center(child: CircularProgressIndicator()); } var pullRequests = snapshot.data; return ListView.builder( primary: false, itemBuilder: (context, index) { var pullRequest = pullRequests[index]; return ListTile( title: Text(pullRequest.title ?? ''), subtitle: Text('flutter/flutter ' 'PR #${pullRequest.number} ' 'opened by ${pullRequest.user?.login ?? ''} ' '(${pullRequest.state?.toLowerCase() ?? ''})'), onTap: () => _launchUrl(this, pullRequest.htmlUrl ?? ''), ); }, itemCount: pullRequests!.length, ); }, ); } } Future<void> _launchUrl(State state, String url) async { if (await canLaunchUrlString(url)) { await launchUrlString(url); } else { if (state.mounted) { return showDialog( context: state.context, builder: (context) => AlertDialog( title: const Text('Navigation error'), content: Text('Could not launch $url'), actions: <Widget>[ TextButton( onPressed: () { Navigator.of(context).pop(); }, child: const Text('Close'), ), ], ), ); } } }
codelabs/github-client/step_07/lib/src/github_summary.dart/0
{ "file_path": "codelabs/github-client/step_07/lib/src/github_summary.dart", "repo_id": "codelabs", "token_count": 3188 }
104
#include "../../Flutter/Flutter-Release.xcconfig" #include "Warnings.xcconfig"
codelabs/github-client/step_07/macos/Runner/Configs/Release.xcconfig/0
{ "file_path": "codelabs/github-client/step_07/macos/Runner/Configs/Release.xcconfig", "repo_id": "codelabs", "token_count": 32 }
105
name: Google Maps in Flutter steps: - name: step_3 steps: - name: Remove generated code rmdir: step_3 - name: Create project flutter: create google_maps_in_flutter --platforms android,ios,web - name: Strip DEVELOPMENT_TEAM strip-lines-containing: DEVELOPMENT_TEAM = path: google_maps_in_flutter/ios/Runner.xcodeproj/project.pbxproj - name: Update dependencies path: google_maps_in_flutter flutter: pub upgrade --major-versions - name: Configure analysis_options.yaml path: google_maps_in_flutter/analysis_options.yaml replace-contents: | include: ../../analysis_options.yaml analyzer: exclude: - lib/src/*.g.dart - name: dart fix dart: fix --apply path: google_maps_in_flutter - name: Add google_maps_flutter path: google_maps_in_flutter flutter: pub add google_maps_flutter - name: Remove the README.md rm: google_maps_in_flutter/README.md - name: VSCode config path: google_maps_in_flutter mkdir: .vscode - name: Add launch.json path: google_maps_in_flutter/.vscode/launch.json replace-contents: | { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "google_maps_in_flutter", "request": "launch", "type": "dart" } ] } - name: Patch android/app/build.gradle path: google_maps_in_flutter/android/app/build.gradle patch-u: | --- b/google-maps-in-flutter/step_3/android/app/build.gradle +++ a/google-maps-in-flutter/step_3/android/app/build.gradle @@ -43,9 +43,9 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.google_maps_in_flutter" - // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion flutter.minSdkVersion + // Minimum Android version for Google Maps SDK + // https://developers.google.com/maps/flutter-plugin/config#android + minSdkVersion 21 targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName - name: Patch ios/Podfile platforms: [ macos ] path: google_maps_in_flutter/ios/Podfile patch-u: | --- b/google-maps-in-flutter/step_3/ios/Podfile +++ a/google-maps-in-flutter/step_3/ios/Podfile @@ -1,5 +1,6 @@ -# Uncomment this line to define a global platform for your project -# platform :ios, '12.0' +# Google Maps SDK requires platform version 14 +# https://developers.google.com/maps/flutter-plugin/config#ios +platform :ios, '14.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' - name: Patch lib/main.dart path: google_maps_in_flutter/lib/main.dart patch-u: | --- b/google-maps-in-flutter/step_3/lib/main.dart +++ a/google-maps-in-flutter/step_3/lib/main.dart @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import 'package:flutter/material.dart'; void main() { - name: Patch test/widget_test.dart path: google_maps_in_flutter/test/widget_test.dart patch-u: | --- b/google-maps-in-flutter/step_3/test/widget_test.dart +++ a/google-maps-in-flutter/step_3/test/widget_test.dart @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // This is a basic Flutter widget test. // // To perform an interaction with a widget in your test, use the WidgetTester - name: flutter clean path: google_maps_in_flutter flutter: clean - name: flutter pub upgrade path: google_maps_in_flutter flutter: pub upgrade - name: build Android platforms: [ macos ] path: google_maps_in_flutter flutter: build apk - name: build iOS platforms: [ macos ] path: google_maps_in_flutter flutter: build ios --simulator - name: build web path: google_maps_in_flutter flutter: build web - name: Copy step_3 copydir: from: google_maps_in_flutter to: step_3 - name: step_4 steps: - name: Remove generated code rmdir: step_4 - name: Patch android/app/src/main/AndroidManifest.xml path: google_maps_in_flutter/android/app/src/main/AndroidManifest.xml patch-u: | --- b/google-maps-in-flutter/step_4/android/app/src/main/AndroidManifest.xml +++ a/google-maps-in-flutter/step_4/android/app/src/main/AndroidManifest.xml @@ -3,6 +3,11 @@ android:label="google_maps_in_flutter" android:name="${applicationName}" android:icon="@mipmap/ic_launcher"> + + <!-- TODO: Add your Google Maps API key here --> + <meta-data android:name="com.google.android.geo.API_KEY" + android:value="YOUR-KEY-HERE"/> + <activity android:name=".MainActivity" android:exported="true" - name: Patch ios/Runner/AppDelegate.swift path: google_maps_in_flutter/ios/Runner/AppDelegate.swift patch-u: | --- b/google-maps-in-flutter/step_4/ios/Runner/AppDelegate.swift +++ a/google-maps-in-flutter/step_4/ios/Runner/AppDelegate.swift @@ -1,5 +1,6 @@ import UIKit import Flutter +import GoogleMaps @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { @@ -8,6 +9,10 @@ import Flutter didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { GeneratedPluginRegistrant.register(with: self) + + // TODO: Add your Google Maps API key + GMSServices.provideAPIKey("YOUR-API-KEY") + return super.application(application, didFinishLaunchingWithOptions: launchOptions) } } - name: Patch web/index.html path: google_maps_in_flutter/web/index.html patch-u: | --- b/google-maps-in-flutter/step_4/web/index.html +++ a/google-maps-in-flutter/step_4/web/index.html @@ -29,6 +29,9 @@ <!-- Favicon --> <link rel="icon" type="image/png" href="favicon.png"/> + <!-- Add your Google Maps API key here --> + <script src="https://maps.googleapis.com/maps/api/js?key=YOUR-KEY-HERE"></script> + <title>google_maps_in_flutter</title> <link rel="manifest" href="manifest.json"> - name: Replace lib/main.dart path: google_maps_in_flutter/lib/main.dart replace-contents: | /* * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; void main() => runApp(const MyApp()); class MyApp extends StatefulWidget { const MyApp({super.key}); @override State<MyApp> createState() => _MyAppState(); } class _MyAppState extends State<MyApp> { late GoogleMapController mapController; final LatLng _center = const LatLng(45.521563, -122.677433); void _onMapCreated(GoogleMapController controller) { mapController = controller; } @override Widget build(BuildContext context) { return MaterialApp( theme: ThemeData( useMaterial3: true, colorSchemeSeed: Colors.green[700], ), home: Scaffold( appBar: AppBar( title: const Text('Maps Sample App'), elevation: 2, ), body: GoogleMap( onMapCreated: _onMapCreated, initialCameraPosition: CameraPosition( target: _center, zoom: 11.0, ), ), ), ); } } - name: Add test/widget_test.dart path: google_maps_in_flutter/test/widget_test.dart replace-contents: | /* * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import 'package:flutter_test/flutter_test.dart'; import 'package:google_maps_in_flutter/main.dart'; void main() { testWidgets('Do nothing test', (tester) async { // Build our app and trigger a frame. await tester.pumpWidget(const MyApp()); }); } - name: Copy step_4 copydir: from: google_maps_in_flutter to: step_4 - name: step_5 steps: - name: Remove generated code rmdir: step_5 - name: Add http json_annotation json_serializable path: google_maps_in_flutter flutter: pub add http json_annotation json_serializable - name: Add build_runner path: google_maps_in_flutter flutter: pub add --dev build_runner - name: Mkdir assets path: google_maps_in_flutter mkdir: assets - name: Add assets/locations.json path: google_maps_in_flutter/assets/locations.json replace-contents: | { "offices": [ { "address": "Aabogade 15\n8200 Aarhus\nDenmark", "id": "aarhus", "image": "https://lh3.googleusercontent.com/tpBMFN5os8K-qXIHiAX5SZEmN5fCzIGrj9FdJtbZPUkC91ookSoY520NYn7fK5yqmh1L1m3F2SJA58v6Qps3JusdrxoFSwk6Ajv2K88", "lat": 56.172249, "lng": 10.187372, "name": "Aarhus", "phone": "", "region": "europe" }, { "address": "Claude Debussylaan 34\n1082 MD, Amsterdam\nNetherlands", "id": "amsterdam", "image": "https://lh3.googleusercontent.com/gG1zKXcSmRyYWHwUn2Z0MITpdqwb52RAEp3uthG2J5Xl-4_Wz7_WmoM6T_TBg6Ut3L1eF-8XENO10sxVIFdQHilj8iRG29wROpSoug", "lat": 52.337801, "lng": 4.872066, "name": "Amsterdam", "phone": "", "region": "europe" }, { "address": "2300 Traverwood Dr.\nAnn Arbor, MI 48105\nUnited States", "id": "ann-arbor", "image": "https://lh3.googleusercontent.com/Iim0OVcAgg9vmXc5ADn9KvOQFplrMZ8hBTg2biiTtuWPy_r56cy4Byx1ROk6coGt7knQdmx_jO45VX1kiCJZ0QzEtS97AP_BYG4F2w", "lat": 42.3063848, "lng": -83.7140833, "name": "Ann Arbor", "phone": "+1 734-332-6500", "region": "north-america" }, { "address": "Fragkokklisias 7\nAthens 151 25\nGreece", "id": "athens", "image": "https://lh3.googleusercontent.com/XroZnqewSrO6KuvXM5hDHtjUJzUcRQLZYfCKs4jP44dKezRvNx58uxaqUKS4fQ2eXzG2TpJNJ1X2xtfBe7Prl5hSG_xjPEF1xLtFodM", "lat": 38.03902, "lng": 23.804595, "name": "Athens", "phone": "", "region": "europe" }, { "address": "10 10th Street NE\nAtlanta, GA 30309\nUnited States", "id": "atlanta", "image": "https://lh3.googleusercontent.com/py7Qvqqoec1MB0dMKnGWn7ju9wET_dIneTb24U-ri8XAsECJnOaBoNmvfa51PIaC0rlsyQvQXvAK8RdLqpkhpkRSzmhNKqb-tY2_", "lat": 33.781827, "lng": -84.387301, "name": "Atlanta", "phone": "+1 404-487-9000", "region": "north-america" }, { "address": "500 W 2nd St\nSuite 2900\nAustin, TX 78701\nUnited States", "id": "austin", "image": "https://lh3.googleusercontent.com/WFaJgWPdd7xPL7CQHizlqEzLDjT_GUAiWHIWUM0PiVSsv8q3Rjt9QgbyQazuQwYfN5qLORajv8eKSHlKwZo-M89T2Y12zFSxSIme08c", "lat": 30.266035, "lng": -97.749237, "name": "Austin", "phone": "+1 512-343-5283", "region": "north-america" }, { "address": "No. 3, RMZ Infinity \u2013 Tower E\nOld Madras Road\n4th and 5th Floors\nBangalore, 560 016, India", "id": "bangalore", "image": "https://lh3.googleusercontent.com/YDyQevoY-D0eZQ9sYHp8dQjpFF5JpLfLK-0OM-uJK1oNK3_LRnGJAM0uXi9qb9UigKnVIIXlIgidxhRlnaB_FPtUOqPzrsCSiFZyoQ", "lat": 12.99332, "lng": 77.660176, "name": "Bangalore", "phone": "+91-80-67218000", "region": "asia-pacific" }, { "address": "57 Park Ventures Ecoplex\n14th Floor, Wireless Road\nBangkok, 10330, Thailand", "id": "bangkok", "image": "https://lh3.googleusercontent.com/nh9uOUPj6iWjKZSHIrnkfGhIWGBb8thguRM5_ehCOkyF-qfwzYciDJFVRSvQ6QxlSA6eZUMkzgdW9zR0Gab2ZZPg8NlB7V_V3wB5", "lat": 13.742866, "lng": 100.547983, "name": "Bangkok", "phone": "", "region": "asia-pacific" }, { "address": "6th Floor, Tower B, Raycom InfoTech Park\nNo. 2 Kexueyuan South Road\nZhongguancun Beijing 100190", "id": "beijing", "image": "https://lh3.googleusercontent.com/v_tD3VvC8-dnhqSF9xhj5Hx7F_bb3-wieM19i-Ho2C3by6mt7-JpPc7KsYVHUZFqQl5ON3adVEV1N4OlzSvHLrr3sr4GtXErDbGC", "lat": 39.9848878, "lng": 116.3265708, "name": "Beijing", "phone": "+86-10-62503000", "region": "asia-pacific" }, { "address": "Boulevard Corporate Tower\nAv. dos Andradas, 3000 - Andares 14-17\nSanta Efig\u00eania\nBelo Horizonte\n30260-070, Brazil", "id": "belo-horizonte", "image": "https://lh3.googleusercontent.com/f7F8gTi9GSgAZR3lv24I1yb-D0wRlDy0lQTcxCB4yJGtSgxrWdKoB3dX3J8SMrjYLwOSXquO3LuGFUE82QUjzVK9buHGNIRUPGpqM3E", "lat": -19.920225, "lng": -43.920845, "name": "Belo Horizonte", "phone": "+55-31-2128-6800", "region": "latin-america" }, { "address": "Tucholskystra\u00dfe 2\n10117 Berlin\nGermany", "id": "berlin", "image": "https://lh3.googleusercontent.com/XcPyEMiSlLdZJq7nh3orGy3UqjtUHdhxXiwn52ZY47wfEChfZNDO78zDy9H0tBeegogZBZpIE0Q9mdVBGN4aQ0M5vfgz8ZWMEe43Mg", "lat": 52.5231079, "lng": 13.39203120000002, "name": "Berlin", "phone": "+49 30 303986300", "region": "europe" }, { "address": "Carrera 11A 94 - 45\nCentro Empresarial Oxo Centre\nBogota, Colombia", "id": "bogota", "image": "https://lh3.googleusercontent.com/_APoV1zAR0g5_pXVDlT2ovgNQfr3zvjOuj4HFHViiy2ahyjapJMXlYRE48qYMyFTWXJybbK4psz-fQ82QhMhO0keYJ27I8tNTHe_ww", "lat": 4.678267, "lng": -74.046901, "name": "Bogota", "phone": "+57 (1) 5939400", "region": "latin-america" }, { "address": "2600 Pearl Street\nBoulder, CO 80302\nUnited States", "id": "boulder", "image": "https://lh3.googleusercontent.com/lF9KBhOolmb958FFmMdLwFcedQAn1wEsVleBRrJQmyfhvD3u4lwCneR09ADJ9sG4tMBP5LDSLkn9bkbavzyqqql_0X7hj39dzl-n1w", "lat": 40.021693, "lng": -105.260139, "name": "Boulder", "phone": "+1 303-245-0086", "region": "north-america" }, { "address": "2930 Pearl St\nBoulder, CO 80301\nUnited States", "id": "boulder-pearl", "image": "https://lh3.googleusercontent.com/_JvBccdhLZSIxenZEubM2Qu8Eky6udmnwekH7BhjI1EUo8mCDXDHa0Z7mfNzvZtlmiXI6b6w8U-PY47oUQhPtvYazGS4mG8S61Rr", "lat": 40.021948, "lng": -105.253978, "name": "Boulder \u2013 Pearl Place", "phone": "+1 303-245-0086", "region": "north-america" }, { "address": "3333 Walnut St\nBoulder CO, 80301\nUnited States", "id": "boulder-walnut", "image": "https://lh3.googleusercontent.com/nGvIFmh9d2J68l-U7gYdQAqLZkLNNS_pqhNMtGopMujEpZEneMSH75NFr1WmXJC0GafDLyTVSpnqbuj5Tfjjjk889Zk23dIggqNN", "lat": 40.01993, "lng": -105.24936, "name": "Boulder \u2013 Walnut", "phone": "+1 303-245-0086", "region": "north-america" }, { "address": "Chaussee d'Etterbeek 180\n1040 Brussels\nBelgium", "id": "brussels", "image": "https://lh3.googleusercontent.com/Vdcj2ozYBIOyJLAhRyQic7xjw-OfQ_F5b8M9Kaom_56M2zp8UW65Lm1bYJLLEc4_U4tXfAp-CA81U2O2tdHcXPdsCEUO0hyK_SFKF-Y", "lat": 50.839315, "lng": 4.380984, "name": "Brussels", "phone": "", "region": "europe" }, { "address": "Alicia M. De Justo 350, 2nd Floor\nBuenos Aires, C1107AAH\nArgentina", "id": "buenos-aires", "image": "https://lh3.googleusercontent.com/08n-ZBH23cWYWAbRo7_uZ6VObzDOLdfvxiAy4vZvX2I_FBn4vlUl_qiwALWBMUp7gQ4LEkj7aW6gB_jdJWNmnsmYEKbWzNsh0EaYpw", "lat": -34.602734, "lng": -58.366992, "name": "Buenos Aires", "phone": "+54-11-5530-3000", "region": "latin-america" }, { "address": "355 Main Street\nCambridge, MA 02142\nUnited States", "id": "cambridge", "image": "https://lh3.googleusercontent.com/OLL4nJ-esDQ3JFh2XpWSpX8WnO69yzFpYPWIy9yL_2WFapf74z_ZYvfqb4XkF0_hT2rCi3pzN2Y-yglQ-jWMw3u89YKwn4GfdT7FfQ", "lat": 42.362757, "lng": -71.087109, "name": "Cambridge", "phone": "+1 617-575-1300", "region": "north-america" }, { "address": "200 West Franklin Street\nChapel Hill, NC 27516\nUnited States", "id": "chapel-hill", "image": "https://lh3.googleusercontent.com/AHShjZrvscMoWixuAd0zIXqER2wKMXtoqX4edIzur3FRLJ3DBDIAQqD6PZqB4it_ApAVyitFkjsRPER38oX6XHYOl9mxKbLCXrAQKA", "lat": 35.912445, "lng": -79.058488, "name": "Chapel Hill", "phone": "", "region": "north-america" }, { "address": "210 Carpenter Ave\nChicago, IL 60607\nUnited States", "id": "chicago-carpenter", "image": "https://lh3.googleusercontent.com/pgZ_JGnbpqS4P8H29c6hOCQcLXiG1EZEw5W92FKddWuUTW8618AwIho27aAFPmniDUpH_jS3mCpAx3nY6WkT46oetsFMC__SrPCUmw", "lat": 41.88609, "lng": -87.65333, "name": "Chicago \u2013 Carpenter", "phone": "", "region": "north-america" }, { "address": "320 N. Morgan, Suite 600\nChicago, IL 60607\nUnited States", "id": "chicago-fulton", "image": "https://lh3.googleusercontent.com/ulGqMc02YGomqRC2EN0JP7jOL-6qaIvhCq225DwyeP7b8l-H7ZTWkYDwVKHc0Z4nXEq_TBRCqqPfcc3N8WHm54XpOh16Yx73F4ng", "lat": 41.8873457, "lng": -87.6526874, "name": "Chicago \u2013 Fulton Market", "phone": "+1 312-840-4100", "region": "north-america" }, { "address": "Skt. Petri Passage 5\n1165 Copenhagen\nDenmark", "id": "copenhagen", "image": "https://lh3.googleusercontent.com/SNSbrYGI_ZBuCl_S8aRh63IIta895tqIUUX3ZT0FWmK7ykhJRy_HNtzoud7XrohnjnSAkuXg9YykkFZqbvkRiZQC7osXrZzGerWdmG8", "lat": 55.680452, "lng": 12.570071, "name": "Copenhagen", "phone": "+45 3370 2600", "region": "europe" }, { "address": "52 Henry St.\n3rd Floor\nDetroit, MI 48201\nUnited States", "id": "detroit", "image": "https://lh3.googleusercontent.com/WEP2INGXZc9vRv1ii6KDZGoRFPyumV466B3RzUwyzf8W81a7du2KGXlDEqS5g0nbOHsYTAvagFGVJskSonpt6wJWN2mVq8ti7JYPtvs", "lat": 42.340458, "lng": -83.054494, "name": "Detroit", "phone": "+1 248-593-4003", "region": "north-america" }, { "address": "TECOM Zone, Dubai Internet City\nDubai, United Arab Emirates", "id": "dubai", "image": "https://lh3.googleusercontent.com/xw0iylnw3b3-qxwoNzLSLJlAAPtkF1KONnIoBTDHtURr04fzH9DeO08GYvEsKYQtE9GCdOMTk_s08H6-btSquKo3moeILfc3Kpu4MA", "lat": 25.0929, "lng": 55.1591, "name": "Dubai", "phone": "+971 4 4509500", "region": "africa-middle-east" }, { "address": "Gordon House\nBarrow St\nDublin 4\nIreland", "id": "dublin", "image": "https://lh3.googleusercontent.com/1z3Fhr6nKlCDeTwc1KoFAMSrnywR0lb8nNdwTI1YgoKSXKIDjQeVB_I3Q8oDZuqqHtlXiUbPmfoUYyAXMObjvMxDcMeTqSY21YvP_A", "lat": 53.3399526, "lng": -6.2360967, "name": "Dublin", "phone": "", "region": "europe" }, { "address": "Taikoo Hui Tower 1, No.383 Tianhe Road\nGuangzhou, 510620\nChina", "id": "guangzhou", "image": "https://lh3.googleusercontent.com/BjYQfVMor1QT5hAkc7DcN6_MJdwaySHY6VJ6IY7mQGJRdXjFZhiP-t4MV_QUbp0tBeuYvuMw3nUetTiI-vFl6-BcialJhhurhFrDVeY", "lat": 23.1339728, "lng": 113.3332488, "name": "Guangzhou", "phone": "", "region": "asia-pacific" }, { "address": "Sector 15, Part II Village Silokhera\nGurgaon 122001\nIndia", "id": "gurgaon", "image": "https://lh3.googleusercontent.com/8plKBiWKmwllCXePad0JJ22u1GG7Qe1hveXlx_xJ87XoiQpclQubwxyGxcDU6tkatpb3oi9MYXjm2XszFi5kGn1flfTtjv6MycBWrQ", "lat": 28.460581, "lng": 77.048194, "name": "Gurgaon", "phone": "+91-12-44512900", "region": "asia-pacific" }, { "address": "Building 30\nMATAM, Advanced Technology Centre\nHaifa, 3190500\nIsrael ", "id": "haifa", "image": "https://lh3.googleusercontent.com/syKfT9cVMzLi0d4_DSiJztWGwcmWct6IEbpAApEFk_G8ym0xyLLxMBT484zROIOZHMSe9N1o-QQrCAqVWfKRSY6EOeJY9Qa1ftwb", "lat": 32.78897, "lng": 34.958432, "name": "Haifa", "phone": "+972-74-746-6245", "region": "africa-middle-east" }, { "address": "ABC-Strasse 19\n20354 Hamburg\nGermany", "id": "hamburg", "image": "https://lh3.googleusercontent.com/66R0svr2--6zNOnrqf6JbeZ-bF39bRfHpExjcTlE_AIlPEPk8jO1LjF39FUbDnJB1gh_FiRFX6aCRg4ACjYRbDqb5lf9PdV6qY4S", "lat": 53.553752, "lng": 9.986229, "name": "Hamburg", "phone": "49 40-80-81-79-000", "region": "europe" }, { "address": "1 Matheson Street\nCauseway Bay, Hong Kong", "id": "hong-kong", "image": "https://lh3.googleusercontent.com/-Ult8_R6TfQAk16CfjSfl6PLypQBYohUjNjE6xeeektZsrP8XwTv7PnVVE-5Ueh3I-2hPnAdRGg6XrMn9IwI7W1h5LJKtlMVe93Wfw", "lat": 22.278203, "lng": 114.18176, "name": "Hong Kong", "phone": "+852-3923-5400", "region": "asia-pacific" }, { "address": "Survey No. 13, DivyaSree Omega\nKondapur Village\nHyderabad, Telangana 500084\nIndia", "id": "hyderabad", "image": "https://lh3.googleusercontent.com/LAEnc0tzA-JSb5XM5oct5paX98QK9zh_aqa_qKcjAoXo2MChgOjdj_EZpgIZsVAvEY-I0bmMmhCBb5gkoVN4ebqCG9ZfjCbo_stJaw", "lat": 17.458461, "lng": 78.372452, "name": "Hyderabad", "phone": "+91-40-6619-3000", "region": "asia-pacific" }, { "address": "19510 Jamboree Road\nIrvine, CA 92612\nUnited States", "id": "irvine", "image": "https://lh3.googleusercontent.com/LWGkhXkRRzWnMlNy_Ps74-VTxB2ISXK0Kkick1SujTLYvNAUqo9_HR7SILSZZsiaiGWsXtx7dR5Hz9Q5psu1MWP9BHtDuGYc_hz_eg", "lat": 33.658792, "lng": -117.859322, "name": "Irvine", "phone": "+1 949-794-1600", "region": "north-america" }, { "address": "Eski Buyukdere Caddesi No: 209\n34394\nIstanbul, Turkey", "id": "istanbul", "image": "https://lh3.googleusercontent.com/_mdN7z1Q-9fKgpHTb1rQJosllxqn7glRJ_G2enX4WPmImuJjLHKw-JBZ8z5B9vMSo12SexGBOD1i2NHXqEy4OaOJekn0g3Fp3bDk_Q", "lat": 41.081697, "lng": 29.00859, "name": "Istanbul", "phone": "", "region": "africa-middle-east" }, { "address": "Pacific Century Place Tower Level 45 SCBD Lot 10,\nJl. Jend. Sudirman No.53,\nRT.5/RW.3, Senayan, Kby. Baru,\nKota Jakarta Selatan,\nDaerah Khusus Ibukota Jakarta 12190, \nIndonesia", "id": "jakarta", "image": "https://lh3.googleusercontent.com/JEaMUfOUq6bxN7jeIN1z2me5-JvlLRkrFJgf_A0GvqtOquU6Tfjg0ecKeR_Ck27L0S1zC2t_4I6nVP6pBdBtSKst7tkJEoC7LyYq", "lat": -6.227664, "lng": 106.808471, "name": "Jakarta", "phone": "", "region": "asia-pacific" }, { "address": "35 Ballyclare Drive, Building E\nJohannesburg\n2191, South Africa", "id": "johannesburg", "image": "https://lh3.googleusercontent.com/EDxefwSgeKyh8zN9VUUGhu3hiBqH7Z3UEOXfZeij7YnUhZLqLElu8dhi4FziOepRun-fjfwIWdf5W8CTG5ZSYMu4k8z9QZjTgjQRuQ", "lat": -26.0734457, "lng": 28.032035, "name": "Johannesburg", "phone": "", "region": "africa-middle-east" }, { "address": "777 6th Street South\nKirkland, WA\nUnited States", "id": "kirkland", "image": "https://lh3.googleusercontent.com/Vgmu21GQbS0pga_tJaG0_35AYOzM64Uxp-zNYyMVnd3oXFHmHeMJpx8UjcsMYdnxbdlFZ4KGFowOtpHxsNlUw8qS21sYBy9jPbqkuA", "lat": 47.669568, "lng": -122.196912, "name": "Kirkland", "phone": "+1 425-739-5600", "region": "north-america" }, { "address": "51 Breithaupt Street\nKitchener, ON N2H 5G5\nCanada", "id": "kitchener", "image": "https://lh3.googleusercontent.com/jUCZzQYnJXCUZ3ZxAEB14qukCV6aGxfh84hExpcpye314DhOWB4jtpUoNDrCtA2laV7qDHBAYGtIuZan9Ir5Hp6_U0B2zTGgPqsb", "lat": 43.4541137, "lng": -80.4992423, "name": "Kitchener", "phone": "+1-519-880-2300", "region": "north-america" }, { "address": "Axiata Tower\nNo. 9, Jalan Stesen Sentral 5\n50470 Kuala Lumpur\nMalaysia", "id": "kuala-lumpur", "image": "https://lh3.googleusercontent.com/c5kAdRoyejY1Z5i9A3hYKfIG55GrKdAc0iJjH-gYo-tWd3JUksvsfZx7LU5yzay4HJmxCQEir2cejbZ2LurYfKL_emC9e9PCDVxd", "lat": 3.133445, "lng": 101.684609, "name": "Kuala Lumpur", "phone": "", "region": "asia-pacific" }, { "address": "Avenida da Liberdade, 110\nLisbon, 1269-046, Portugal", "id": "lisbon", "image": "https://lh3.googleusercontent.com/py3HZVLLpxjMhRL6fgUKmHqGODp6ZH-5abQBHGqyKrCyuoW0t-q0ypNVN_jOfD3ZEO08Y9Q0m-E4ZyuNrMgl-mlaECkCAEyc7Af1", "lat": 38.718887, "lng": -9.143781, "name": "Lisbon", "phone": "+351 21 122 1803", "region": "europe" }, { "address": "6 Pancras Square\nLondon N1C 4AG\nUnited Kingdom", "id": "london-6ps", "image": "https://lh3.googleusercontent.com/WTxWzt3AOcEMwoT2OonLTlc63pa4V-GsYbZg5Hu7rfe9ZioMaRurkxaQ5tOcuC9nZkCyh2IjQb-xMy4Tq8ISrHjfDHmzZXnExTjP", "lat": 51.533311, "lng": -0.126026, "name": "London \u2013 6PS", "phone": "+44-20-7031-3000", "region": "europe" }, { "address": "Belgrave House\n76 Buckingham Palace Road\nLondon SW1W 9TQ\nUnited Kingdom", "id": "london-bel", "image": "https://lh3.googleusercontent.com/bLxZNCaDE2Fdj7woV_9JUJEUfUvTrhI57jHNEeW-OenTspzM21miwz1gGydzZ2Ke_vfRdkqdo4dyN2mJCntC2p4qvRUyipPWppAC9g", "lat": 51.494961, "lng": -0.146652, "name": "London \u2013 BEL", "phone": "+44-20-7031-3001", "region": "europe" }, { "address": "1\u201313 St Giles High St\nLondon WC2H 8AG\nUnited Kingdom", "id": "london-csg", "image": "https://lh3.googleusercontent.com/32nlExbSrV5rJR9Qsqfkbckn6_yd-4QRaoSDmp9JLyaZxojfl9aH1LZSrSvcsT128AUzHqkEfMhTE2miDuOu7gj-7x3Ginqr4rgowg", "lat": 51.516027, "lng": -0.12755, "name": "London \u2013 CSG", "phone": "+44 (0)20-7031-3000", "region": "europe" }, { "address": "340 Main Street\nLos Angeles, CA 90291\nUnited States", "id": "los-angeles", "image": "https://lh3.googleusercontent.com/MWGnaY3t_1-j7YylPpq35rvBU9gIBJIsnrtW95THrBw9N0PWrAVtbHKUBH8OdxyWI9gYdymndmSgwS8tl23GylytyefNC74i4-pniQ", "lat": 33.995939, "lng": -118.4766773, "name": "Los Angeles, US", "phone": "+1 310-310-6000", "region": "north-america" }, { "address": "811 E Washington Ave\nSuite 700\nMadison, WI 53703\nUnited States", "id": "madison", "image": "https://lh3.googleusercontent.com/sQDFJpbQl4EVGfdpHsw_24mxsnUNAnDs6f-00QCj0g_Z38CEqjG4PuLPoS_T6eTOPV3QXX907Kap_TkaE3cEG4fhJWIoWsZELIGyvw", "lat": 43.081091, "lng": -89.374619, "name": "Madison", "phone": "+1 608-669-9841", "region": "north-america" }, { "address": "Plaza Pablo Ruiz Picasso, I\nMadrid 28020\nSpain", "id": "madrid", "image": "https://lh3.googleusercontent.com/x36CdPxkwxxctp0wvDYfTjgTzNgMiZV0xoKeLMwHzdccpJGYUA6a61fSeX1_Rt-lfofMjfUwAhFxd7DbjsE8_393plkTly-T5YkpCA", "lat": 40.4505331, "lng": -3.6931161, "name": "Madrid", "phone": "+34 91-748-6400", "region": "europe" }, { "address": "161 Collins Street,\nMelbourne VIC 3000,\nAustralia", "id": "melbourne", "image": "https://lh3.googleusercontent.com/U_5KiB8x7T-Rrdp90ygnO1kbZxiWJz4G6CbD6_51CjH5zaMP23upWELryFOe99k_AqlPZschCY7Nx--wYufcIV54HnjGcP3lf28X1A", "lat": -37.815328, "lng": 144.968737, "name": "Melbourne", "phone": "", "region": "asia-pacific" }, { "address": "Google Mexico, S. de R.L. de C.V.\nMontes Urales 445\nLomas de Chapultepec\nMexico City 11000, Mexico", "id": "mexico-city", "image": "https://lh3.googleusercontent.com/P_U5ECZJ--t8khoKFxoeeJwa7PZy-3TriZbit5sRJDUdupf3NZRJegsnB4ucLqdLEV3De41fmByckDDC6uHMI82cXIFp4C1WwI1a1g", "lat": 19.4283793, "lng": -99.2065518, "name": "Mexico City", "phone": "+52 55-5342-8400", "region": "latin-america" }, { "address": "1450 Brickell Ave Ste 900 \nMiami FL 33131\nUnited States", "id": "miami", "image": "https://lh3.googleusercontent.com/DTk99d9bCqiCN8sFj3FBr8BdGPYC97PCYbiLbdq6GZ-_Er268DSlvfRM_g8hwA5tOmw_6c3PBjpKpuRQTuXS8H8_hpIlCQKyobyYjQ", "lat": 25.758473, "lng": -80.1932144, "name": "Miami", "phone": "+1 305-985-7900", "region": "north-america" }, { "address": "Porta Nuova Isola, Building C, Via Federico Confalonieri 4\n20124 Milan\nItaly", "id": "milan", "image": "https://lh3.googleusercontent.com/nZ_KE1LqNmW5qb6i-czLlm_yqRJtLmvEmyLRI0BYjqMlOiC_5VmbEI3DeHQyPOHp6PzoN2gKJ0j73BALkddFmDFXOIe9Wwctmt73cqI", "lat": 45.486147, "lng": 9.189546, "name": "Milan", "phone": "", "region": "europe" }, { "address": "1253 McGill College Avenue\nMontreal, QC H3B 2Y5\nCanada", "id": "montreal", "image": "https://lh3.googleusercontent.com/S310Um4pKym8bvHQcQmJLc4ohURWEq3AQHjJ-b5aMY-TpA9P4LCKcxGEg4fik-zSL6MrtiEi8Qt3JbAZl8x-GiI31wfm_myGfb3manQ", "lat": 45.50191, "lng": -73.570365, "name": "Montreal", "phone": "514-670-8700", "region": "north-america" }, { "address": "7 Balchug St\nMoscow 115035\nRussia", "id": "moscow", "image": "https://lh3.googleusercontent.com/i6cwRxcix3LUdviTVKoLG2Ep6q9pjfPIX_nrge-YkgjIvTgCH5QQpSI6wCpKvg0HiH56lHu6K8eAkCrPZUCzspS6Y9K19U47xr4hww", "lat": 55.746747, "lng": 37.626435, "name": "Moscow", "phone": "+7-495-644-1400", "region": "europe" }, { "address": "1600 Amphitheatre Parkway\nMountain View, CA 94043\nUnited States", "id": "mountain-view", "image": "https://lh3.googleusercontent.com/Mh8P8gvVwO7NOXfg8anxwPXRy5oKZJ6Cz_LbFfOVdeIsdDfogmMcMsiW7HD7HD2NOINzAPH_v8dALWSuDiiTjCjRnenI7B3l6Pg4yw", "lat": 37.421512, "lng": -122.084101, "name": "Mountain View", "phone": "", "region": "north-america" }, { "address": "3 North Avenue\nMaker Maxity, Bandra Kurla Complex\nBandra East\nMumbai, Maharashtra 400051\nIndia", "id": "mumbai", "image": "https://lh3.googleusercontent.com/twldrlVORn84fYsOLwNLabfRPQYX-dJAzJtpam-Ea4D7QIY1pvMa9FCMbpjUFA8uniBg6XAh8pMijf9qnjmEm4d17UFkwRGToiv5Ug", "lat": 19.054364, "lng": 72.850591, "name": "Mumbai", "phone": "+91-22-6611-7150", "region": "asia-pacific" }, { "address": "Erika-Mann-Str. 33\n80636 Munich\nGermany", "id": "munich", "image": "https://lh3.googleusercontent.com/sVZqxencTTD84raIgMWd5SbmXZTvQmwUzxj6IakbIGuAua5JDu-Q64uJE-cm3TYeSjKVQo7VSwIODVpwswjtrpwBUvXTa5MDFXoNAw", "lat": 48.14305556, "lng": 11.54083333, "name": "Munich", "phone": "", "region": "europe" }, { "address": "111 8th Avenue\nNew York, NY 10011\nUnited States", "id": "new-york", "image": "https://lh3.googleusercontent.com/BWdXxSOqBpjGFzAJVVr02QQs5XSe33dEeNDG6lXhd-nuv32ruMjD01yBJX3Rk4_xP6glB1ycMvwypEPr6YO665grfWqEEI2LPYUaMg", "lat": 40.741445, "lng": -74.003102, "name": "New York", "phone": "+1 212-565-0000", "region": "north-america" }, { "address": "Aker Brygge\nBryggegata 6\n0250 Oslo\nNorway", "id": "oslo", "image": "https://lh3.googleusercontent.com/lc9jPxaz4CzdC3sD4wFlzml1Y221PvtsisYGenint536WNbyIMY2cp2qnQOmnT0IWPoOCjarwMgK6zddvTcOu6YcAuaVLfQAdqZ2UQg", "lat": 59.90987, "lng": 10.72598, "name": "Oslo", "phone": "", "region": "europe" }, { "address": "8 Rue de Londres\n75009 Paris\nFrance", "id": "paris", "image": "https://lh3.googleusercontent.com/GHZlAB7t3toRGww1NJ6ZC2IpvR0jkgqFkQ0ZvM02dmQWt6fiHIKJZ7Eova959UD0PAapPE2r2TYMe3-dE3jGDgEoqHch0qyjAKvPENc", "lat": 48.8771, "lng": 2.33, "name": "Paris", "phone": "", "region": "europe" }, { "address": "6425 Penn Avenue\nPittsburgh, PA 15206\nUnited States", "id": "pittsburgh", "image": "https://lh3.googleusercontent.com/47kJwc4CR6oGOI2l_su5CJHnEWkrUZlz7LZRGXHgF71xa-0gJc8qCBhnsNoigcNEGFfBpb3y5AxVXJP_TxvHtgUgTrU8zmBm3Two7w", "lat": 40.45716, "lng": -79.916596, "name": "Pittsburgh", "phone": "+1 412-345-6700", "region": "north-america" }, { "address": "12422 W. Bluff Creek Drive\nPlaya Vista, CA 90094\nUnited States", "id": "playa-vista", "image": "https://lh3.googleusercontent.com/xnHVNI6bCcQxJyLV6sG3op8PlJcT9XgMAGmHrXtj5axhCZPH7Tbc9Ppjb2gTCtGbKmilT17B0dKzczOJh9JANh8Wwz0SXH0pEqCOkQ", "lat": 33.97684, "lng": -118.407244, "name": "Playa Vista", "phone": "", "region": "north-america" }, { "address": "Wells Fargo Building, 309 SW 6th Ave\nPortland, OR 97204\nUnited States", "id": "portland", "image": "https://lh3.googleusercontent.com/FMeFmwWFZJD02kj0H73t5v8NPrVOecVxuCl9cA-vLiXgaXErYQxmMXJKvvROgwSNvgPdmRZ4-GQuub74p0dDwJgY37vBNN2vgx7Utw", "lat": 45.521622, "lng": -122.677458, "name": "Portland", "phone": "", "region": "north-america" }, { "address": "Stroupeznickeho str. 3191/17\nPrague, Czech Republic\n150 00", "id": "prague", "image": "https://lh3.googleusercontent.com/jVNKH2mzDQ4Zu1-1G80-nDvLHYE9dmeetv43WG3zo7-dQWJoX1ghtXvviZHDLRG-ScqA804I2guuExY-8pkzIdkYlU28QGOB8Jkkiw", "lat": 50.070259, "lng": 14.402642, "name": "Prague", "phone": "", "region": "europe" }, { "address": "1600 Seaport Boulevard\nRedwood City, CA 94063\nUnited States", "id": "redwood-city", "image": "https://lh3.googleusercontent.com/a7GCRT1go5jQzEQj--A-kq98pURYsO4cTCJPj6azEev7za4Y__Kd3E_khFyn5uxRtPC0Co_ZxzQtqrlXeOSNey8fOSV4pK0ffzSW5A", "lat": 37.512171, "lng": -122.201178, "name": "Redwood City", "phone": "", "region": "north-america" }, { "address": "1875 Explorer Street \n10th Floor\nReston, VA 20190\nUnited States", "id": "reston", "image": "https://lh3.googleusercontent.com/4WuJCZlLflcQjsyhsGX3VSGDEVmC0Ljq291ECgVk3nN89ppnhSbdQIRI1I1-qh5YEf0Yicdc6amuqKz7oAdgLvQoNBrM9Zh3BcUwSw", "lat": 38.958309, "lng": -77.359795, "name": "Reston", "phone": "+1 202-370-5600", "region": "north-america" }, { "address": "901 Cherry Avenue\nSan Bruno, CA 94066\nUnited States", "id": "san-bruno", "image": "https://lh3.googleusercontent.com/zcy-Un_QDZfx7nTlImk-jCocxSUjQAQ4SS0eVdBuNRZz3Nyb5WK_2oGwYpnBEdqjIcv_b-umq_akpWBEylaEp-wXk3pj9-gu6Ko9Igs", "lat": 37.62816, "lng": -122.426491, "name": "San Bruno", "phone": "", "region": "north-america" }, { "address": "6420 Sequence Dr \nSuite 400\nSan Diego, CA 92121\nUnited States", "id": "san-diego", "image": "https://lh3.googleusercontent.com/RgGUUE3ra1j-mQIH8vp6an37hlwduD8uVnaCv8ivo5mX6ekdnZYd0-hlQ1hpQzV0ZgPk7y8h60oWy5MK5VF48ozZMYRXnh1ddJjuVGo", "lat": 32.90961, "lng": -117.181899, "name": "San Diego", "phone": "+1 858-239-4000", "region": "north-america" }, { "address": "345 Spear Street\nSan Francisco, CA 94105\nUnited States", "id": "san-francisco", "image": "https://lh3.googleusercontent.com/OC_0_XdXLar-ytOETAv3uwRGfnLABSRu66hqLQpLrwIhqInPD6ccdZSEu_d5S8wmjc1knb9OM7yNh2K7hoGznvKZOgFlvrxJesd7mQ", "lat": 37.789972, "lng": -122.390013, "name": "San Francisco", "phone": "+1 415-736-0000", "region": "north-america" }, { "address": "Costanera Sur Rio 2730 \nLas Condes, Santiago\nChile", "id": "santiago", "image": "https://lh3.googleusercontent.com/KrMbZzxFsAcNmYg8BQL_qBAekN1bNNJGo1aar8nkFhYXYDYOBmwJc2x1XElkDdIqLdedU5V7QKTGxXne8-f-qAW_bOy1FUqmJ8JM", "lat": -33.413383, "lng": -70.605665, "name": "Santiago", "phone": "", "region": "latin-america" }, { "address": "Av. Brigadeiro Faria Lima, 3477 \nS\u00e3o Paulo\n04538-133, Brazil", "id": "sao-paulo", "image": "https://lh3.googleusercontent.com/MwcGyEZBKkmoycVLcpl_U3gdIJBoWDU8u2kUNq57DmZVkWDyraoaZyQC0HOiFQvNHjVugEiVTWsy-poAsNfDLoSkJ5RoTBi1Hpd4GcI", "lat": -23.586479, "lng": -46.682078, "name": "Sao Paulo", "phone": "", "region": "latin-america" }, { "address": "601 N. 34th Street\nSeattle, WA 98103\nUnited States", "id": "seattle", "image": "https://lh3.googleusercontent.com/pNaRyPV3SkqsVvmdmN0sC-viBupr-41tZM3_cpSNH_3Zdy826gIhM0zHfoowA6SCkcsOkUxDvJ8wG5CodorohisOgR9q_QE7wH1ua-M", "lat": 47.649316, "lng": -122.350629, "name": "Seattle", "phone": "+1 206-876-1800", "region": "north-america" }, { "address": "Google Korea LLC.\n22nd Floor, Gangnam Finance Centre\n152 Teheran-ro, Gangnam-gu\nSeoul 06236\nSouth Korea", "id": "seoul", "image": "https://lh3.googleusercontent.com/i8rfvJIUNpLBkmWWSoetUzFGHUd_RaulLh8F3EHme3FMTUtDs8EVWsrFLuaemh1Zd60p5ndCcKq8-ZQN8eibbua-YNzlzQ8AKtHFzrQ", "lat": 37.500295, "lng": 127.036843, "name": "Seoul", "phone": "+82-2-531-9000", "region": "asia-pacific" }, { "address": "100 Century Avenue, Pudong\nShanghai 200120\nChina", "id": "shanghai", "image": "https://lh3.googleusercontent.com/wFCKLAJvrAoE_GiXqRNa0w4Rsr0iY_SyMGbO2jnIhLXGanYs1c5_BPE8TxQJw-e14uaLDHjY772V-Vv-Kf3GmrIRSlHjoV9yD339wRQ", "lat": 31.23464, "lng": 121.507662, "name": "Shanghai", "phone": "+86-21-6133-7666", "region": "asia-pacific" }, { "address": "70 Pasir Panjang Road, #03-71, \nMapletree Business City \nSingapore 117371", "id": "singapore", "image": "https://lh3.googleusercontent.com/--5H57B8aG4-DX9s79Spo3ygrsI9NMFnZo1uTZzs5s5AeeOvmiy81k__tu9r7JbRTTLzryK-oUy0UREclmD_qfV81VvaT4K9jJa8gg", "lat": 1.276466, "lng": 103.798965, "name": "Singapore", "phone": "+65 6521-8000", "region": "asia-pacific" }, { "address": "Kungsbron 2 \n111 22 Stockholm\nSweden", "id": "stockholm", "image": "https://lh3.googleusercontent.com/Q2016qdodQKowCyzfN14RLYERc2IplyM2FzJvj0kzbW4eLXnIxoFF1eZMc_CwtodxbpyfhfebUrawHtIgFb2kh9-EQnhcaHXpV0Fnw", "lat": 59.333432, "lng": 18.054619, "name": "Stockholm", "phone": "", "region": "europe" }, { "address": "803 11th Avenue\nSunnyvale, CA 94089\nUnited States", "id": "sunnyvale", "image": "https://lh3.googleusercontent.com/xd1Z3wr4cee9gtKQSnrOd-NWjc6UTwpwngElt4pkqukzOf-l0hrgQuRRBzvSjqmF4w1ZAHR1I12grFa5Zhqd9-7dKUitPtpMg51Zrf8", "lat": 37.403694, "lng": -122.031583, "name": "Sunnyvale", "phone": "", "region": "north-america" }, { "address": "48 Pirrama Road\nSydney, NSW 2009\nAustralia ", "id": "sydney", "image": "https://lh3.googleusercontent.com/03Hp4ZwQHs_rWLEWQtrOc62hEHzffD_uoZFCbo56eoeLyZ3L89-Fy5Dd8WcmrGFGK31QC_hZqzuU7f9QhxqjckE7BSLo_arwWjCH1w", "lat": -33.866638, "lng": 151.195672, "name": "Sydney", "phone": "+61 2 9374 4000", "region": "asia-pacific" }, { "address": "No. 7 XinYi Road Section 5, Taipei\nTaiwan", "id": "taipei", "image": "https://lh3.googleusercontent.com/h19TQz36F4jY_ZfQxuP5F-THZbl4nAIGz473uFfLqzD_6kpw-r3b6M_Wbna5QvvymqZ-wdnhkLCRt63Pypnc9GyawNqMlQwM1_BYbg", "lat": 25.033447, "lng": 121.564901, "name": "Taipei", "phone": "+886 2 8729 6000", "region": "asia-pacific" }, { "address": "Yigal Alon 98\nTel Aviv, 6789141\nIsrael ", "id": "tel-aviv", "image": "https://lh3.googleusercontent.com/BZxU1dJCWFmtVeBqVYFC8SmSzX4CCzO5eedosW1s7sv2b2HoKwEno15vICfeQdsc_BGIaysKb8VyF64IB9hbFzMZ_MlQDJhP7kfF", "lat": 32.070043, "lng": 34.794087, "name": "Tel Aviv", "phone": "+972-74-746-6453", "region": "africa-middle-east" }, { "address": "Roppongi Hills Mori Tower\n6-10-1 Roppongi\nMinato-ku, Tokyo 106-6126\nJapan", "id": "tokyo-rpg", "image": "https://lh3.googleusercontent.com/i7PqriAmbeqB7KQ4h_8K0T60DD-oAoz7bvvjlB4vx2267l9QHfKBHb7WUMSutYd88Xu4TRwWqIquL05bYcpTyU_58gWp8Ja2Xo2zOfM", "lat": 35.66047, "lng": 139.729231, "name": "Tokyo \u2013 RPG", "phone": "+81-3-6384-9000", "region": "asia-pacific" }, { "address": "Shibuya Stream\n3-21-3 Shibuya\nShibuya-ku, Tokyo 150-0002\nJapan", "id": "tokyo-strm", "image": "https://lh3.googleusercontent.com/GzaUJcEqlixelFX8dg1qcLPwAb4RpEXr3JMxyxpgSTWL17Gso_aq3NeMtQPES7f_JdIrGr9YTBSt08XgNAeoLSkxr3Ue_J0cW3VMCw", "lat": 35.6572564, "lng": 139.7028246, "name": "Tokyo \u2013 STRM", "phone": "+81-3-6384-9000", "region": "asia-pacific" }, { "address": "111 Richmond Street West\nToronto, ON M5H 2G4\nCanada", "id": "toronto", "image": "https://lh3.googleusercontent.com/vZUQcWL3r_bsHBRP-Z0XfhMxjlSAAe9sZLlw5rbBzqsM6w-WVjnTZGaw3w-PkqkhHPy0x-2Xzg_gishFkVjn5r3epKifwhmRc741", "lat": 43.650477, "lng": -79.383858, "name": "Toronto", "phone": "416-915-8200", "region": "north-america" }, { "address": "Graben 19\n1010 Wien\nAustria", "id": "vienna", "image": "https://lh3.googleusercontent.com/roYQN_TnYd_fP0FCdZxA6lMLbp-h7PyPlDBKwVdfVWKkOCxmLjFHqm-n7hrcakcXHS1FzjXW5XWF_MApzuGIrvy2cewCYd7Z9q5MUw", "lat": 48.209351, "lng": 16.368419, "name": "Vienna", "phone": "", "region": "europe" }, { "address": "Emilii Plater 53\n00-113 Warsaw\nPoland ", "id": "warsaw", "image": "https://lh3.googleusercontent.com/jTf0m2s5A2qS25ArE3x6Tl1KXtpv3JmHIfcBuw7f-JHsTR0tMiyUVeHO1wBeJ2eEGcAWUbTe3b9B8iP8wyL-TROS5zxmMofMHsnf", "lat": 52.233448, "lng": 21.001668, "name": "Warsaw", "phone": "+48 22 207 19 00", "region": "europe" }, { "address": "25 Massachusetts Avenue\nWashington DC, 20001\nUnited States", "id": "washington-dc", "image": "https://lh3.googleusercontent.com/6rKu8CCH6nMVKjwpnxDlgf_Sdlc7jk83QBVhoLikzEyibYTZkvNPn-QPCJTv3AkjUYf2dHcE15UvPsrg18xNd4R8_eg3b-yn01yXgQ", "lat": 38.898337, "lng": -77.010286, "name": "Washington DC", "phone": " (202) 346-1100", "region": "north-america" }, { "address": "Gen. Jozefa Bema nr 2\n50-265 Wroclaw\nPoland", "id": "wroclaw", "image": "https://lh3.googleusercontent.com/Or6dY4MCUCbMnDv4kG8J7u-QTsWhvbqbAbMN9Vp38aJAS7ec7A39gYddcEGbrwd_veFeZo2phypqc1ABk20PZ9jCVxZfuNGYS7j3LDc", "lat": 51.117687, "lng": 17.041737, "name": "Wroclaw", "phone": "+48 (71) 73 41 000", "region": "europe" }, { "address": "Brandschenkestrasse 110\n8002 Z\u00fcrich\nSwitzerland", "id": "zurich", "image": "https://lh3.googleusercontent.com/kmEsDEYzbMlluwDPYkeEEBpAvL9MJbXZR3hD3uettOqE8T7lbXvV508j4d4QngB7iwYZa8YYlXiVnGWfZ4ZvTJbputGXsfxrLGhD3tI", "lat": 47.365063, "lng": 8.524425, "name": "Zurich", "phone": "+41 44 668 18 00", "region": "europe" } ], "regions": [ { "coords": { "lat": 2.9660291, "lng": 1.3271339 }, "id": "africa-middle-east", "name": "Africa & Middle East", "zoom": 3.0 }, { "coords": { "lat": 0.0524811, "lng": 127.6560787 }, "id": "asia-pacific", "name": "Asia Pacific", "zoom": 3.0 }, { "coords": { "lat": 46.1352815, "lng": 7.4033438 }, "id": "europe", "name": "Europe", "zoom": 4.0 }, { "coords": { "lat": -17.5554497, "lng": -99.2316195 }, "id": "latin-america", "name": "Latin America", "zoom": 3.0 }, { "coords": { "lat": 45.7128252, "lng": -97.1547448 }, "id": "north-america", "name": "North America", "zoom": 4.0 } ] } - name: Mkdir lib/src path: google_maps_in_flutter mkdir: lib/src - name: Add lib/src/locations.dart path: google_maps_in_flutter/lib/src/locations.dart replace-contents: | /* * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import 'dart:convert'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart' show rootBundle; import 'package:http/http.dart' as http; import 'package:json_annotation/json_annotation.dart'; part 'locations.g.dart'; @JsonSerializable() class LatLng { LatLng({ required this.lat, required this.lng, }); factory LatLng.fromJson(Map<String, dynamic> json) => _$LatLngFromJson(json); Map<String, dynamic> toJson() => _$LatLngToJson(this); final double lat; final double lng; } @JsonSerializable() class Region { Region({ required this.coords, required this.id, required this.name, required this.zoom, }); factory Region.fromJson(Map<String, dynamic> json) => _$RegionFromJson(json); Map<String, dynamic> toJson() => _$RegionToJson(this); final LatLng coords; final String id; final String name; final double zoom; } @JsonSerializable() class Office { Office({ required this.address, required this.id, required this.image, required this.lat, required this.lng, required this.name, required this.phone, required this.region, }); factory Office.fromJson(Map<String, dynamic> json) => _$OfficeFromJson(json); Map<String, dynamic> toJson() => _$OfficeToJson(this); final String address; final String id; final String image; final double lat; final double lng; final String name; final String phone; final String region; } @JsonSerializable() class Locations { Locations({ required this.offices, required this.regions, }); factory Locations.fromJson(Map<String, dynamic> json) => _$LocationsFromJson(json); Map<String, dynamic> toJson() => _$LocationsToJson(this); final List<Office> offices; final List<Region> regions; } Future<Locations> getGoogleOffices() async { const googleLocationsURL = 'https://about.google/static/data/locations.json'; // Retrieve the locations of Google offices try { final response = await http.get(Uri.parse(googleLocationsURL)); if (response.statusCode == 200) { return Locations.fromJson( json.decode(response.body) as Map<String, dynamic>); } } catch (e) { if (kDebugMode) { print(e); } } // Fallback for when the above HTTP request fails. return Locations.fromJson( json.decode( await rootBundle.loadString('assets/locations.json'), ) as Map<String, dynamic>, ); } - name: Patch lib/main.dart path: google_maps_in_flutter/lib/main.dart patch-u: | --- b/google-maps-in-flutter/step_5/lib/main.dart +++ a/google-maps-in-flutter/step_5/lib/main.dart @@ -16,8 +16,11 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'src/locations.dart' as locations; -void main() => runApp(const MyApp()); +void main() { + runApp(const MyApp()); +} class MyApp extends StatefulWidget { const MyApp({super.key}); @@ -27,12 +30,23 @@ class MyApp extends StatefulWidget { } class _MyAppState extends State<MyApp> { - late GoogleMapController mapController; - - final LatLng _center = const LatLng(45.521563, -122.677433); - - void _onMapCreated(GoogleMapController controller) { - mapController = controller; + final Map<String, Marker> _markers = {}; + Future<void> _onMapCreated(GoogleMapController controller) async { + final googleOffices = await locations.getGoogleOffices(); + setState(() { + _markers.clear(); + for (final office in googleOffices.offices) { + final marker = Marker( + markerId: MarkerId(office.name), + position: LatLng(office.lat, office.lng), + infoWindow: InfoWindow( + title: office.name, + snippet: office.address, + ), + ); + _markers[office.name] = marker; + } + }); } @override @@ -44,15 +58,16 @@ class _MyAppState extends State<MyApp> { ), home: Scaffold( appBar: AppBar( - title: const Text('Maps Sample App'), + title: const Text('Google Office Locations'), elevation: 2, ), body: GoogleMap( onMapCreated: _onMapCreated, - initialCameraPosition: CameraPosition( - target: _center, - zoom: 11.0, + initialCameraPosition: const CameraPosition( + target: LatLng(0, 0), + zoom: 2, ), + markers: _markers.values.toSet(), ), ), ); - name: Patch pubspec.yaml path: google_maps_in_flutter/pubspec.yaml patch-u: | --- b/google-maps-in-flutter/step_5/pubspec.yaml +++ a/google-maps-in-flutter/step_5/pubspec.yaml @@ -93,3 +93,5 @@ flutter: # # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages + assets: + - assets/locations.json - name: flutter doctor path: google_maps_in_flutter flutter: doctor - name: Run build_runner path: google_maps_in_flutter flutter: pub run build_runner build - name: Patch lib/src/locations.g.dart path: google_maps_in_flutter/lib/src/locations.g.dart patch-u: | --- b/google-maps-in-flutter/step_5/lib/src/locations.g.dart +++ a/google-maps-in-flutter/step_5/lib/src/locations.g.dart @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // GENERATED CODE - DO NOT MODIFY BY HAND part of 'locations.dart'; - name: flutter clean path: google_maps_in_flutter flutter: clean - name: flutter pub upgrade path: google_maps_in_flutter flutter: pub upgrade - name: build Android platforms: [ macos ] path: google_maps_in_flutter flutter: build apk - name: build iOS platforms: [ macos ] path: google_maps_in_flutter flutter: build ios --simulator - name: build web path: google_maps_in_flutter flutter: build web - name: Copy step_5 copydir: from: google_maps_in_flutter to: step_5 - name: Cleanup google_maps_in_flutter rmdir: google_maps_in_flutter
codelabs/google-maps-in-flutter/codelab_rebuild.yaml/0
{ "file_path": "codelabs/google-maps-in-flutter/codelab_rebuild.yaml", "repo_id": "codelabs", "token_count": 45674 }
106
package com.example.google_maps_in_flutter import io.flutter.embedding.android.FlutterActivity class MainActivity: FlutterActivity()
codelabs/google-maps-in-flutter/step_4/android/app/src/main/kotlin/com/example/google_maps_in_flutter/MainActivity.kt/0
{ "file_path": "codelabs/google-maps-in-flutter/step_4/android/app/src/main/kotlin/com/example/google_maps_in_flutter/MainActivity.kt", "repo_id": "codelabs", "token_count": 40 }
107
/* * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'src/locations.dart' as locations; void main() { runApp(const MyApp()); } class MyApp extends StatefulWidget { const MyApp({super.key}); @override State<MyApp> createState() => _MyAppState(); } class _MyAppState extends State<MyApp> { final Map<String, Marker> _markers = {}; Future<void> _onMapCreated(GoogleMapController controller) async { final googleOffices = await locations.getGoogleOffices(); setState(() { _markers.clear(); for (final office in googleOffices.offices) { final marker = Marker( markerId: MarkerId(office.name), position: LatLng(office.lat, office.lng), infoWindow: InfoWindow( title: office.name, snippet: office.address, ), ); _markers[office.name] = marker; } }); } @override Widget build(BuildContext context) { return MaterialApp( theme: ThemeData( useMaterial3: true, colorSchemeSeed: Colors.green[700], ), home: Scaffold( appBar: AppBar( title: const Text('Google Office Locations'), elevation: 2, ), body: GoogleMap( onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(0, 0), zoom: 2, ), markers: _markers.values.toSet(), ), ), ); } }
codelabs/google-maps-in-flutter/step_5/lib/main.dart/0
{ "file_path": "codelabs/google-maps-in-flutter/step_5/lib/main.dart", "repo_id": "codelabs", "token_count": 826 }
108
import 'package:flutter/material.dart'; import 'app.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( title: 'Haiku Generator Demo', theme: ThemeData( useMaterial3: true, ), home: const HaikuPage(title: 'Haiku generator for Google products'), ); } }
codelabs/haiku_generator/finished/lib/main.dart/0
{ "file_path": "codelabs/haiku_generator/finished/lib/main.dart", "repo_id": "codelabs", "token_count": 162 }
109
import 'package:flutter/material.dart'; import 'package:haiku_generator/controller/poem_controller.dart'; import 'package:haiku_generator/controller/product_controller.dart'; import 'package:haiku_generator/widgets/shimmer_loading_anim.dart'; import 'domain/models/product.dart'; class HaikuPage extends StatefulWidget { const HaikuPage({super.key, required this.title}); final String title; @override State<HaikuPage> createState() => HaikuPageState(); } class HaikuPageState extends State<HaikuPage> { List<Product> listProduct = []; final ProductController productController = ProductController(); final PoemController poemController = PoemController(); String haikuText = ''; String productName = 'Google Search'; String subTitle = 'Choose a Google product here:'; Future getProductData() async { var productData = await productController.getProducts(); setState(() { listProduct = productData; }); } Future getHaikuTextData(String productName) async { var poemData = await poemController.getPoem(productName); setState(() { haikuText = poemData; }); } @override void initState() { super.initState(); getProductData(); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.title), ), body: Center( child: Padding( padding: const EdgeInsets.all(16.0), child: Column( children: <Widget>[ buildTopView(), const SizedBox( height: 10.0, ), buildBottomView() ], )), ), ); } Column buildTopView() { return Column( children: <Widget>[ Text( subTitle, style: const TextStyle( fontSize: 18, color: Colors.black, ), ), SizedBox( width: 150.0, child: DropdownButton<Product>( items: listProduct.map((Product value) { return DropdownMenuItem<Product>( value: value, child: Text(value.productName), ); }).toList(), hint: Text(productName.toString(), style: const TextStyle(color: Colors.deepPurpleAccent)), underline: Container( height: 1, color: Colors.deepPurpleAccent, ), onChanged: (value) { setState(() { productName = value!.productName; haikuText = ''; }); }, isExpanded: true, ), ), FilledButton( onPressed: () => getHaikuTextData(productName.toString()), style: FilledButton.styleFrom( padding: const EdgeInsets.symmetric(vertical: 5, horizontal: 18), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(5), ), ), child: const Text( 'Generate haiku!', style: TextStyle( color: Colors.white, fontSize: 18, fontWeight: FontWeight.w500, ), ), ) ], ); } Expanded buildBottomView() { return Expanded( child: haikuText.isNotEmpty ? Container( decoration: BoxDecoration( color: Colors.amberAccent.shade100, borderRadius: BorderRadius.circular(8), ), child: Padding( padding: const EdgeInsets.all(8.0), child: SizedBox( width: double.maxFinite, child: Text( haikuText, style: const TextStyle( color: Colors.black, fontSize: 18, fontWeight: FontWeight.w300, ), ), ), ), ) : ShimmerLoadingAnim( isLoading: true, child: Container( height: double.maxFinite, width: double.maxFinite, decoration: BoxDecoration( color: const Color(0xFFE5E5E5), borderRadius: BorderRadius.circular(8), ), ), ), ); } }
codelabs/haiku_generator/step0/lib/app.dart/0
{ "file_path": "codelabs/haiku_generator/step0/lib/app.dart", "repo_id": "codelabs", "token_count": 2274 }
110
#import "GeneratedPluginRegistrant.h"
codelabs/homescreen_codelab/step_03/ios/Runner/Runner-Bridging-Header.h/0
{ "file_path": "codelabs/homescreen_codelab/step_03/ios/Runner/Runner-Bridging-Header.h", "repo_id": "codelabs", "token_count": 13 }
111
<?xml version="1.0" encoding="utf-8"?><!-- Background for widgets to make the rounded corners based on the appWidgetRadius attribute value --> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <corners android:radius="?attr/appWidgetRadius" /> <solid android:color="?android:attr/colorBackground" /> </shape>
codelabs/homescreen_codelab/step_04/android/app/src/main/res/drawable-v21/app_widget_background.xml/0
{ "file_path": "codelabs/homescreen_codelab/step_04/android/app/src/main/res/drawable-v21/app_widget_background.xml", "repo_id": "codelabs", "token_count": 116 }
112
<resources> <color name="light_blue_50">#FFE1F5FE</color> <color name="light_blue_200">#FF81D4FA</color> <color name="light_blue_600">#FF039BE5</color> <color name="light_blue_900">#FF01579B</color> </resources>
codelabs/homescreen_codelab/step_04/android/app/src/main/res/values/colors.xml/0
{ "file_path": "codelabs/homescreen_codelab/step_04/android/app/src/main/res/values/colors.xml", "repo_id": "codelabs", "token_count": 99 }
113
{ "colors" : [ { "idiom" : "universal" } ], "info" : { "author" : "xcode", "version" : 1 } }
codelabs/homescreen_codelab/step_04/ios/NewsWidgets/Assets.xcassets/AccentColor.colorset/Contents.json/0
{ "file_path": "codelabs/homescreen_codelab/step_04/ios/NewsWidgets/Assets.xcassets/AccentColor.colorset/Contents.json", "repo_id": "codelabs", "token_count": 70 }
114
name: homescreen_widgets description: A sample Flutter project for adding home screen widgets. publish_to: 'none' version: 1.0.0+1 environment: sdk: ^3.2.0 dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.2 shared_preferences: ^2.0.15 home_widget: ^0.3.0 dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^3.0.0 flutter: uses-material-design: true fonts: - family: Chewy fonts: - asset: fonts/Chewy-Regular.ttf
codelabs/homescreen_codelab/step_04/pubspec.yaml/0
{ "file_path": "codelabs/homescreen_codelab/step_04/pubspec.yaml", "repo_id": "codelabs", "token_count": 210 }
115
<?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"> <plist version="1.0"> <dict> <key>CADisableMinimumFrameDurationOnPhone</key> <true/> <key>CFBundleDevelopmentRegion</key> <string>$(DEVELOPMENT_LANGUAGE)</string> <key>CFBundleDisplayName</key> <string>Homescreen Widgets</string> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>homescreen_widgets</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>$(FLUTTER_BUILD_NAME)</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>$(FLUTTER_BUILD_NUMBER)</string> <key>LSRequiresIPhoneOS</key> <true/> <key>UIApplicationSupportsIndirectInputEvents</key> <true/> <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/> </dict> </plist>
codelabs/homescreen_codelab/step_06/ios/Runner/Info.plist/0
{ "file_path": "codelabs/homescreen_codelab/step_06/ios/Runner/Info.plist", "repo_id": "codelabs", "token_count": 674 }
116
import 'package:flutter/cupertino.dart'; import 'dash_counter.dart'; import 'firebase_notifier.dart'; class DashUpgrades extends ChangeNotifier { DashCounter counter; FirebaseNotifier firebaseNotifier; DashUpgrades(this.counter, this.firebaseNotifier) { counter.addListener(_onCounterChange); _updateUpgradeOptions(); } Upgrade tim = Upgrade(cost: 5, work: 1, count: 0); void _onCounterChange() { if (_updateUpgradeOptions()) notifyListeners(); } bool _updateUpgradeOptions() { var hasChanges = false; hasChanges = _updateUpgrade(tim) | hasChanges; return hasChanges; } bool _updateUpgrade(Upgrade upgrade) { var canBuy = counter.count >= upgrade.cost; if (canBuy == upgrade.purchasable) return false; upgrade._purchasable = canBuy; return true; } void addTim() { _buy(tim); } void _buy( Upgrade upgrade, ) { if (counter.count < upgrade.cost) return; counter.addAutoIncrement( incrementPerSecond: upgrade.work, costs: upgrade.cost, ); upgrade._increment(); _updateUpgradeOptions(); notifyListeners(); } @override void dispose() { counter.removeListener(_onCounterChange); super.dispose(); } } class Upgrade { int get cost => _cost; late int _cost; double get work => _work; late double _work; int get count => _count; late int _count; bool get purchasable => _purchasable; bool _purchasable = false; Upgrade({required int cost, required double work, required int count}) { _cost = cost; _work = work; _count = count; } void _increment() { _count++; _cost = (_cost * 1.3).ceil(); } }
codelabs/in_app_purchases/complete/app/lib/logic/dash_upgrades.dart/0
{ "file_path": "codelabs/in_app_purchases/complete/app/lib/logic/dash_upgrades.dart", "repo_id": "codelabs", "token_count": 594 }
117
### Configuration Files Create `lib/constants.dart` with: ``` const androidPackageId = "your Android package ID"; const appStoreIssuerId = 'App Store Key issuer ID'; const appStoreKeyId = 'App Store Keu ID'; const appStoreSharedSecret = "App Store shared secret"; const bundleId = 'your iOS bundle ID'; const googlePlayProjectName = "Google Cloud project name"; const googlePlayPubsubBillingTopic = "play_billing"; // change if necessary ``` - Add `assets/service-account-firebase.json` with the server key for the Firebase Firestore project. - Add `assets/service-account-google-play.json` with the server key for the Google Play access key project. - Add `assets/SubscriptionKey.p8` with the server key for the App Store. ### Running Run locally with `dart run ./bin/server.dart`.
codelabs/in_app_purchases/complete/dart-backend/README.md/0
{ "file_path": "codelabs/in_app_purchases/complete/dart-backend/README.md", "repo_id": "codelabs", "token_count": 223 }
118
const cloudRegion = 'europe-west1'; const storeKeyConsumable = 'dash_consumable_2k'; const storeKeyUpgrade = 'dash_upgrade_3d'; const storeKeySubscription = 'dash_subscription_doubler'; // TODO: Replace by your own server IP const serverIp = '192.168.178.46';
codelabs/in_app_purchases/step_00/app/lib/constants.dart/0
{ "file_path": "codelabs/in_app_purchases/step_00/app/lib/constants.dart", "repo_id": "codelabs", "token_count": 89 }
119
import 'package:dashclicker/main.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { testWidgets('App starts', (tester) async { await tester.pumpWidget(const MyApp()); expect(find.text('Tim Sneath'), findsOneWidget); }); }
codelabs/in_app_purchases/step_00/app/test/widget_test.dart/0
{ "file_path": "codelabs/in_app_purchases/step_00/app/test/widget_test.dart", "repo_id": "codelabs", "token_count": 93 }
120
import 'package:dashclicker/main.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:in_app_purchase/in_app_purchase.dart'; import 'package:in_app_purchase_platform_interface/src/in_app_purchase_platform_addition.dart'; void main() { testWidgets('App starts', (tester) async { IAPConnection.instance = TestIAPConnection(); await tester.pumpWidget(const MyApp()); expect(find.text('Tim Sneath'), findsOneWidget); }); } class TestIAPConnection implements InAppPurchase { @override Future<bool> buyConsumable( {required PurchaseParam purchaseParam, bool autoConsume = true}) { return Future.value(false); } @override Future<bool> buyNonConsumable({required PurchaseParam purchaseParam}) { return Future.value(false); } @override Future<void> completePurchase(PurchaseDetails purchase) { return Future.value(); } @override Future<bool> isAvailable() { return Future.value(false); } @override Future<ProductDetailsResponse> queryProductDetails(Set<String> identifiers) { return Future.value(ProductDetailsResponse( productDetails: [], notFoundIDs: [], )); } @override T getPlatformAddition<T extends InAppPurchasePlatformAddition?>() { // TODO: implement getPlatformAddition throw UnimplementedError(); } @override Stream<List<PurchaseDetails>> get purchaseStream => Stream.value(<PurchaseDetails>[]); @override Future<void> restorePurchases({String? applicationUserName}) { // TODO: implement restorePurchases throw UnimplementedError(); } }
codelabs/in_app_purchases/step_07/app/test/widget_test.dart/0
{ "file_path": "codelabs/in_app_purchases/step_07/app/test/widget_test.dart", "repo_id": "codelabs", "token_count": 530 }
121
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.dashclicker"> <!-- Flutter needs it to communicate with the running application to allow setting breakpoints, to provide hot reload, etc. --> <uses-permission android:name="android.permission.INTERNET"/> </manifest>
codelabs/in_app_purchases/step_10/app/android/app/src/profile/AndroidManifest.xml/0
{ "file_path": "codelabs/in_app_purchases/step_10/app/android/app/src/profile/AndroidManifest.xml", "repo_id": "codelabs", "token_count": 108 }
122
import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import '../logic/dash_purchases.dart'; import '../logic/firebase_notifier.dart'; import '../model/firebase_state.dart'; import '../model/purchasable_product.dart'; import '../model/store_state.dart'; import '../repo/iap_repo.dart'; import 'login_page.dart'; class PurchasePage extends StatelessWidget { const PurchasePage({super.key}); @override Widget build(BuildContext context) { var firebaseNotifier = context.watch<FirebaseNotifier>(); if (firebaseNotifier.state == FirebaseState.loading) { return _PurchasesLoading(); } else if (firebaseNotifier.state == FirebaseState.notAvailable) { return _PurchasesNotAvailable(); } if (!firebaseNotifier.loggedIn) { return const LoginPage(); } var upgrades = context.watch<DashPurchases>(); Widget storeWidget; switch (upgrades.storeState) { case StoreState.loading: storeWidget = _PurchasesLoading(); case StoreState.available: storeWidget = _PurchaseList(); case StoreState.notAvailable: storeWidget = _PurchasesNotAvailable(); } return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ storeWidget, const Padding( padding: EdgeInsets.fromLTRB(32.0, 32.0, 32.0, 0.0), child: Text( 'Past purchases', style: TextStyle(fontWeight: FontWeight.bold), ), ), const PastPurchasesWidget(), ]); } } class _PurchasesLoading extends StatelessWidget { @override Widget build(BuildContext context) { return const Center(child: Text('Store is loading')); } } class _PurchasesNotAvailable extends StatelessWidget { @override Widget build(BuildContext context) { return const Center(child: Text('Store not available')); } } class _PurchaseList extends StatelessWidget { @override Widget build(BuildContext context) { var purchases = context.watch<DashPurchases>(); var products = purchases.products; return Column( children: products .map((product) => _PurchaseWidget( product: product, onPressed: () { purchases.buy(product); })) .toList(), ); } } class _PurchaseWidget extends StatelessWidget { final PurchasableProduct product; final VoidCallback onPressed; const _PurchaseWidget({ required this.product, required this.onPressed, }); @override Widget build(BuildContext context) { var title = product.title; if (product.status == ProductStatus.purchased) { title += ' (purchased)'; } return InkWell( onTap: onPressed, child: ListTile( title: Text( title, ), subtitle: Text(product.description), trailing: Text(_trailing()), )); } String _trailing() { return switch (product.status) { ProductStatus.purchasable => product.price, ProductStatus.purchased => 'purchased', ProductStatus.pending => 'buying...' }; } } class PastPurchasesWidget extends StatelessWidget { const PastPurchasesWidget({super.key}); @override Widget build(BuildContext context) { var purchases = context.watch<IAPRepo>().purchases; return ListView.separated( shrinkWrap: true, itemCount: purchases.length, itemBuilder: (context, index) => ListTile( title: Text(purchases[index].title), subtitle: Text(purchases[index].status.toString()), ), separatorBuilder: (context, index) => const Divider(), ); } }
codelabs/in_app_purchases/step_10/app/lib/pages/purchase_page.dart/0
{ "file_path": "codelabs/in_app_purchases/step_10/app/lib/pages/purchase_page.dart", "repo_id": "codelabs", "token_count": 1412 }
123
class ProductData { final String productId; final ProductType type; const ProductData(this.productId, this.type); } enum ProductType { subscription, nonSubscription, } const productDataMap = { 'dash_consumable_2k': ProductData( 'dash_consumable_2k', ProductType.nonSubscription, ), 'dash_upgrade_3d': ProductData( 'dash_upgrade_3d', ProductType.nonSubscription, ), 'dash_subscription_doubler': ProductData( 'dash_subscription_doubler', ProductType.subscription, ), };
codelabs/in_app_purchases/step_10/dart-backend/lib/products.dart/0
{ "file_path": "codelabs/in_app_purchases/step_10/dart-backend/lib/products.dart", "repo_id": "codelabs", "token_count": 190 }
124
org.gradle.jvmargs=-Xmx4G android.useAndroidX=true android.enableJetifier=true
codelabs/namer/step_04_b_behavior/android/gradle.properties/0
{ "file_path": "codelabs/namer/step_04_b_behavior/android/gradle.properties", "repo_id": "codelabs", "token_count": 30 }
125
name: namer_app description: A new Flutter project. publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 0.0.1+1 environment: sdk: ^3.2.0 dependencies: flutter: sdk: flutter english_words: ^4.0.0 provider: ^6.0.0 dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^3.0.0 flutter: uses-material-design: true
codelabs/namer/step_04_b_behavior/pubspec.yaml/0
{ "file_path": "codelabs/namer/step_04_b_behavior/pubspec.yaml", "repo_id": "codelabs", "token_count": 157 }
126
#include "Generated.xcconfig"
codelabs/namer/step_05_b_extract/ios/Flutter/Release.xcconfig/0
{ "file_path": "codelabs/namer/step_05_b_extract/ios/Flutter/Release.xcconfig", "repo_id": "codelabs", "token_count": 12 }
127
#include "ephemeral/Flutter-Generated.xcconfig"
codelabs/namer/step_05_b_extract/macos/Flutter/Flutter-Release.xcconfig/0
{ "file_path": "codelabs/namer/step_05_b_extract/macos/Flutter/Flutter-Release.xcconfig", "repo_id": "codelabs", "token_count": 19 }
128
#include "../../Flutter/Flutter-Release.xcconfig" #include "Warnings.xcconfig"
codelabs/namer/step_05_c_card_padding/macos/Runner/Configs/Release.xcconfig/0
{ "file_path": "codelabs/namer/step_05_c_card_padding/macos/Runner/Configs/Release.xcconfig", "repo_id": "codelabs", "token_count": 32 }
129
include: package:flutter_lints/flutter.yaml linter: rules: avoid_print: false prefer_const_constructors_in_immutables: false prefer_const_constructors: false prefer_const_literals_to_create_immutables: false prefer_final_fields: false unnecessary_breaks: true use_key_in_widget_constructors: false
codelabs/namer/step_05_e_text_style/analysis_options.yaml/0
{ "file_path": "codelabs/namer/step_05_e_text_style/analysis_options.yaml", "repo_id": "codelabs", "token_count": 120 }
130
#include "Generated.xcconfig"
codelabs/namer/step_05_g_center_vertical/ios/Flutter/Debug.xcconfig/0
{ "file_path": "codelabs/namer/step_05_g_center_vertical/ios/Flutter/Debug.xcconfig", "repo_id": "codelabs", "token_count": 12 }
131
#include "ephemeral/Flutter-Generated.xcconfig"
codelabs/namer/step_05_g_center_vertical/macos/Flutter/Flutter-Debug.xcconfig/0
{ "file_path": "codelabs/namer/step_05_g_center_vertical/macos/Flutter/Flutter-Debug.xcconfig", "repo_id": "codelabs", "token_count": 19 }
132
#import "GeneratedPluginRegistrant.h"
codelabs/namer/step_05_h_center_horizontal/ios/Runner/Runner-Bridging-Header.h/0
{ "file_path": "codelabs/namer/step_05_h_center_horizontal/ios/Runner/Runner-Bridging-Header.h", "repo_id": "codelabs", "token_count": 13 }
133
#include "../../Flutter/Flutter-Debug.xcconfig" #include "Warnings.xcconfig"
codelabs/namer/step_05_h_center_horizontal/macos/Runner/Configs/Debug.xcconfig/0
{ "file_path": "codelabs/namer/step_05_h_center_horizontal/macos/Runner/Configs/Debug.xcconfig", "repo_id": "codelabs", "token_count": 32 }
134
package com.example.namer_app import io.flutter.embedding.android.FlutterActivity class MainActivity: FlutterActivity()
codelabs/namer/step_06_c_add_like_button/android/app/src/main/kotlin/com/example/namer_app/MainActivity.kt/0
{ "file_path": "codelabs/namer/step_06_c_add_like_button/android/app/src/main/kotlin/com/example/namer_app/MainActivity.kt", "repo_id": "codelabs", "token_count": 36 }
135
import 'package:english_words/english_words.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return ChangeNotifierProvider( create: (context) => MyAppState(), child: MaterialApp( title: 'Namer App', theme: ThemeData( useMaterial3: true, colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepOrange), ), home: MyHomePage(), ), ); } } class MyAppState extends ChangeNotifier { var current = WordPair.random(); void getNext() { current = WordPair.random(); notifyListeners(); } var favorites = <WordPair>[]; void toggleFavorite() { if (favorites.contains(current)) { favorites.remove(current); } else { favorites.add(current); } notifyListeners(); } } class MyHomePage extends StatefulWidget { @override State<MyHomePage> createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { @override Widget build(BuildContext context) { return Scaffold( body: Row( children: [ SafeArea( child: NavigationRail( extended: false, destinations: [ NavigationRailDestination( icon: Icon(Icons.home), label: Text('Home'), ), NavigationRailDestination( icon: Icon(Icons.favorite), label: Text('Favorites'), ), ], selectedIndex: 0, onDestinationSelected: (value) { print('selected: $value'); }, ), ), Expanded( child: Container( color: Theme.of(context).colorScheme.primaryContainer, child: GeneratorPage(), ), ), ], ), ); } } class GeneratorPage extends StatelessWidget { @override Widget build(BuildContext context) { var appState = context.watch<MyAppState>(); var pair = appState.current; IconData icon; if (appState.favorites.contains(pair)) { icon = Icons.favorite; } else { icon = Icons.favorite_border; } return Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ BigCard(pair: pair), SizedBox(height: 10), Row( mainAxisSize: MainAxisSize.min, children: [ ElevatedButton.icon( onPressed: () { appState.toggleFavorite(); }, icon: Icon(icon), label: Text('Like'), ), SizedBox(width: 10), ElevatedButton( onPressed: () { appState.getNext(); }, child: Text('Next'), ), ], ), ], ), ); } } class BigCard extends StatelessWidget { const BigCard({ super.key, required this.pair, }); final WordPair pair; @override Widget build(BuildContext context) { final theme = Theme.of(context); final style = theme.textTheme.displayMedium!.copyWith( color: theme.colorScheme.onPrimary, ); return Card( color: theme.colorScheme.primary, child: Padding( padding: const EdgeInsets.all(20), child: Text( pair.asLowerCase, style: style, semanticsLabel: "${pair.first} ${pair.second}", ), ), ); } }
codelabs/namer/step_07_b_convert_to_stateful/lib/main.dart/0
{ "file_path": "codelabs/namer/step_07_b_convert_to_stateful/lib/main.dart", "repo_id": "codelabs", "token_count": 1820 }
136
org.gradle.jvmargs=-Xmx4G android.useAndroidX=true android.enableJetifier=true
codelabs/namer/step_07_d_use_selectedindex/android/gradle.properties/0
{ "file_path": "codelabs/namer/step_07_d_use_selectedindex/android/gradle.properties", "repo_id": "codelabs", "token_count": 30 }
137
#include "Generated.xcconfig"
codelabs/namer/step_08/ios/Flutter/Release.xcconfig/0
{ "file_path": "codelabs/namer/step_08/ios/Flutter/Release.xcconfig", "repo_id": "codelabs", "token_count": 12 }
138
#include "ephemeral/Flutter-Generated.xcconfig"
codelabs/namer/step_08/macos/Flutter/Flutter-Release.xcconfig/0
{ "file_path": "codelabs/namer/step_08/macos/Flutter/Flutter-Release.xcconfig", "repo_id": "codelabs", "token_count": 19 }
139
// Copyright 2023 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'dart:math'; import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:vector_math/vector_math_64.dart' as v64; import 'orb_shader_config.dart'; class OrbShaderPainter extends CustomPainter { OrbShaderPainter( this.shader, { required this.config, required this.time, required this.mousePos, required this.energy, }); final FragmentShader shader; final OrbShaderConfig config; final double time; final Offset mousePos; final double energy; @override void paint(Canvas canvas, Size size) { double fov = v64.mix(pi / 4.3, pi / 2.0, config.zoom.clamp(0.0, 1.0)); v64.Vector3 colorToVector3(Color c) => v64.Vector3( c.red.toDouble(), c.green.toDouble(), c.blue.toDouble(), ) / 255.0; v64.Vector3 lightLumP = colorToVector3(config.lightColor).normalized() * max(0.0, config.lightBrightness); v64.Vector3 albedo = colorToVector3(config.materialColor); v64.Vector3 ambientLight = colorToVector3(config.ambientLightColor) * max(0.0, config.ambientLightBrightness); shader.setFloat(0, size.width); shader.setFloat(1, size.height); shader.setFloat(2, time); shader.setFloat(3, max(0.0, config.exposure)); shader.setFloat(4, fov); shader.setFloat(5, config.roughness.clamp(0.0, 1.0)); shader.setFloat(6, config.metalness.clamp(0.0, 1.0)); shader.setFloat(7, config.lightOffsetX); shader.setFloat(8, config.lightOffsetY); shader.setFloat(9, config.lightOffsetZ); shader.setFloat(10, config.lightRadius); shader.setFloat(11, lightLumP.x); shader.setFloat(12, lightLumP.y); shader.setFloat(13, lightLumP.z); shader.setFloat(14, albedo.x); shader.setFloat(15, albedo.y); shader.setFloat(16, albedo.z); shader.setFloat(17, config.ior.clamp(0.0, 2.0)); shader.setFloat(18, config.lightAttenuation.clamp(0.0, 1.0)); shader.setFloat(19, ambientLight.x); shader.setFloat(20, ambientLight.y); shader.setFloat(21, ambientLight.z); shader.setFloat(22, config.ambientLightDepthFactor.clamp(0.0, 1.0)); shader.setFloat(23, energy); canvas.drawRect( Rect.fromLTWH(0, 0, size.width, size.height), Paint()..shader = shader, ); } @override bool shouldRepaint(covariant OrbShaderPainter oldDelegate) { return oldDelegate.shader != shader || oldDelegate.config != config || oldDelegate.time != time || oldDelegate.mousePos != mousePos || oldDelegate.energy != energy; } }
codelabs/next-gen-ui/step_01/lib/orb_shader/orb_shader_painter.dart/0
{ "file_path": "codelabs/next-gen-ui/step_01/lib/orb_shader/orb_shader_painter.dart", "repo_id": "codelabs", "token_count": 1118 }
140
// // Generated file. Do not edit. // // clang-format off #include "generated_plugin_registrant.h" #include <window_size/window_size_plugin.h> void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) window_size_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "WindowSizePlugin"); window_size_plugin_register_with_registrar(window_size_registrar); }
codelabs/next-gen-ui/step_02_b/linux/flutter/generated_plugin_registrant.cc/0
{ "file_path": "codelabs/next-gen-ui/step_02_b/linux/flutter/generated_plugin_registrant.cc", "repo_id": "codelabs", "token_count": 151 }
141
org.gradle.jvmargs=-Xmx4G android.useAndroidX=true android.enableJetifier=true
codelabs/next-gen-ui/step_02_c/android/gradle.properties/0
{ "file_path": "codelabs/next-gen-ui/step_02_c/android/gradle.properties", "repo_id": "codelabs", "token_count": 30 }
142
// Copyright 2023 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'dart:ui' as ui; import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_animate/flutter_animate.dart'; /** * This is an unfinished, pre-release effect for Flutter Animate: * https://pub.dev/packages/flutter_animate * * It includes a copy of `AnimatedSampler` from Flutter Shaders: * https://github.com/jonahwilliams/flutter_shaders * * Once `AnimatedSampler` (or equivalent) is stable, or included in the core * SDK, this effect will be updated, tested, refined, and added to the * effects.dart file. */ // TODO: document. /// An effect that lets you apply an animated fragment shader to a target. @immutable class ShaderEffect extends Effect<double> { const ShaderEffect({ super.delay, super.duration, super.curve, this.shader, this.update, ShaderLayer? layer, }) : layer = layer ?? ShaderLayer.replace, super( begin: 0, end: 1, ); final ui.FragmentShader? shader; final ShaderUpdateCallback? update; final ShaderLayer layer; @override Widget build( BuildContext context, Widget child, AnimationController controller, EffectEntry entry, ) { double ratio = 1 / MediaQuery.of(context).devicePixelRatio; Animation<double> animation = buildAnimation(controller, entry); return getOptimizedBuilder<double>( animation: animation, builder: (_, __) { return AnimatedSampler( (image, size, canvas) { EdgeInsets? insets; if (update != null) { insets = update!(shader!, animation.value, size, image); } Rect rect = Rect.fromLTWH(0, 0, size.width, size.height); rect = insets?.inflateRect(rect) ?? rect; void drawImage() { canvas.save(); canvas.scale(ratio, ratio); canvas.drawImage(image, Offset.zero, Paint()); canvas.restore(); } if (layer == ShaderLayer.foreground) drawImage(); if (shader != null) canvas.drawRect(rect, Paint()..shader = shader); if (layer == ShaderLayer.background) drawImage(); }, enabled: shader != null, child: child, ); }, ); } } extension ShaderEffectExtensions<T> on AnimateManager<T> { /// Adds a [shader] extension to [AnimateManager] ([Animate] and [AnimateList]). T shader({ Duration? delay, Duration? duration, Curve? curve, ui.FragmentShader? shader, ShaderUpdateCallback? update, ShaderLayer? layer, }) => addEffect(ShaderEffect( delay: delay, duration: duration, curve: curve, shader: shader, update: update, layer: layer, )); } enum ShaderLayer { foreground, background, replace } /// Function signature for [ShaderEffect] update handlers. typedef ShaderUpdateCallback = EdgeInsets? Function( ui.FragmentShader shader, double value, Size size, ui.Image image); /******************************************************************************/ // TODO: add this as a dependency instead of copying it in once it is stable: // https://github.com/jonahwilliams/flutter_shaders // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /// A callback for the [AnimatedSamplerBuilder] widget. typedef AnimatedSamplerBuilder = void Function( ui.Image image, Size size, ui.Canvas canvas, ); /// A widget that allows access to a snapshot of the child widgets for painting /// with a sampler applied to a [FragmentProgram]. /// /// When [enabled] is true, the child widgets will be painted into a texture /// exposed as a [ui.Image]. This can then be passed to a [FragmentShader] /// instance via [FragmentShader.setSampler]. /// /// If [enabled] is false, then the child widgets are painted as normal. /// /// Caveats: /// * Platform views cannot be captured in a texture. If any are present they /// will be excluded from the texture. Texture-based platform views are OK. /// /// Example: /// /// Providing an image to a fragment shader using /// [FragmentShader.setImageSampler]. /// /// ```dart /// Widget build(BuildContext context) { /// return AnimatedSampler( /// (ui.Image image, Size size, Canvas canvas) { /// shader /// ..setFloat(0, size.width) /// ..setFloat(1, size.height) /// ..setImageSampler(0, image); /// canvas.drawRect(Offset.zero & size, Paint()..shader = shader); /// }, /// child: widget.child, /// ); /// } /// ``` /// /// See also: /// * [SnapshotWidget], which provides a similar API for the purpose of /// caching during expensive animations. class AnimatedSampler extends StatelessWidget { /// Create a new [AnimatedSampler]. const AnimatedSampler( this.builder, { required this.child, super.key, this.enabled = true, }); /// A callback used by this widget to provide the children captured in /// a texture. final AnimatedSamplerBuilder builder; /// Whether the children should be captured in a texture or displayed as /// normal. final bool enabled; /// The child widget. final Widget child; @override Widget build(BuildContext context) { return _ShaderSamplerBuilder( builder, enabled: enabled, child: child, ); } } class _ShaderSamplerBuilder extends SingleChildRenderObjectWidget { const _ShaderSamplerBuilder( this.builder, { super.child, required this.enabled, }); final AnimatedSamplerBuilder builder; final bool enabled; @override RenderObject createRenderObject(BuildContext context) { return _RenderShaderSamplerBuilderWidget( devicePixelRatio: MediaQuery.of(context).devicePixelRatio, builder: builder, enabled: enabled, ); } @override void updateRenderObject( BuildContext context, covariant RenderObject renderObject) { (renderObject as _RenderShaderSamplerBuilderWidget) ..devicePixelRatio = MediaQuery.of(context).devicePixelRatio ..builder = builder ..enabled = enabled; } } // A render object that conditionally converts its child into a [ui.Image] // and then paints it in place of the child. class _RenderShaderSamplerBuilderWidget extends RenderProxyBox { // Create a new [_RenderSnapshotWidget]. _RenderShaderSamplerBuilderWidget({ required double devicePixelRatio, required AnimatedSamplerBuilder builder, required bool enabled, }) : _devicePixelRatio = devicePixelRatio, _builder = builder, _enabled = enabled; @override OffsetLayer updateCompositedLayer( {required covariant _ShaderSamplerBuilderLayer? oldLayer}) { final _ShaderSamplerBuilderLayer layer = oldLayer ?? _ShaderSamplerBuilderLayer(builder); layer ..callback = builder ..size = size ..devicePixelRatio = devicePixelRatio; return layer; } /// The device pixel ratio used to create the child image. double get devicePixelRatio => _devicePixelRatio; double _devicePixelRatio; set devicePixelRatio(double value) { if (value == devicePixelRatio) { return; } _devicePixelRatio = value; markNeedsCompositedLayerUpdate(); } /// The painter used to paint the child snapshot or child widgets. AnimatedSamplerBuilder get builder => _builder; AnimatedSamplerBuilder _builder; set builder(AnimatedSamplerBuilder value) { if (value == builder) { return; } _builder = value; markNeedsCompositedLayerUpdate(); } bool get enabled => _enabled; bool _enabled; set enabled(bool value) { if (value == enabled) { return; } _enabled = value; markNeedsPaint(); markNeedsCompositingBitsUpdate(); } @override bool get isRepaintBoundary => alwaysNeedsCompositing; @override bool get alwaysNeedsCompositing => enabled; @override void paint(PaintingContext context, Offset offset) { if (size.isEmpty || !_enabled) { return; } assert(offset == Offset.zero); return super.paint(context, offset); } } /// A [Layer] that uses an [AnimatedSamplerBuilder] to create a [ui.Picture] /// every time it is added to a scene. class _ShaderSamplerBuilderLayer extends OffsetLayer { _ShaderSamplerBuilderLayer(this._callback); Size get size => _size; Size _size = Size.zero; set size(Size value) { if (value == size) { return; } _size = value; markNeedsAddToScene(); } double get devicePixelRatio => _devicePixelRatio; double _devicePixelRatio = 1.0; set devicePixelRatio(double value) { if (value == devicePixelRatio) { return; } _devicePixelRatio = value; markNeedsAddToScene(); } AnimatedSamplerBuilder get callback => _callback; AnimatedSamplerBuilder _callback; set callback(AnimatedSamplerBuilder value) { if (value == callback) { return; } _callback = value; markNeedsAddToScene(); } ui.Image _buildChildScene(Rect bounds, double pixelRatio) { final ui.SceneBuilder builder = ui.SceneBuilder(); final Matrix4 transform = Matrix4.diagonal3Values(pixelRatio, pixelRatio, 1); builder.pushTransform(transform.storage); addChildrenToScene(builder); builder.pop(); return builder.build().toImageSync( (pixelRatio * bounds.width).ceil(), (pixelRatio * bounds.height).ceil(), ); } @override void addToScene(ui.SceneBuilder builder) { if (size.isEmpty) return; final ui.Image image = _buildChildScene( offset & size, devicePixelRatio, ); final ui.PictureRecorder pictureRecorder = ui.PictureRecorder(); final Canvas canvas = Canvas(pictureRecorder); try { callback(image, size, canvas); } finally { image.dispose(); } final ui.Picture picture = pictureRecorder.endRecording(); builder.addPicture(offset, picture); } }
codelabs/next-gen-ui/step_02_c/lib/common/shader_effect.dart/0
{ "file_path": "codelabs/next-gen-ui/step_02_c/lib/common/shader_effect.dart", "repo_id": "codelabs", "token_count": 3607 }
143
name: next_gen_ui description: "Building a Next Generation UI in Flutter" publish_to: 'none' version: 0.1.0 environment: sdk: '>=3.3.0-279.2.beta <4.0.0' dependencies: cupertino_icons: ^1.0.6 extra_alignments: ^1.0.0+1 flextras: ^1.0.0 flutter: sdk: flutter flutter_animate: ^4.5.0 focusable_control_builder: ^1.0.2+1 gap: ^3.0.1 particle_field: ^1.0.0 provider: ^6.1.1 rnd: ^0.2.0 vector_math: ^2.1.4 window_size: git: url: https://github.com/google/flutter-desktop-embedding.git path: plugins/window_size dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^3.0.0 flutter: uses-material-design: true fonts: - family: Exo fonts: - asset: assets/fonts/Exo-Bold.ttf - asset: assets/fonts/Exo-Medium.ttf assets: - assets/images/ - assets/fonts/ shaders: - assets/shaders/orb_shader.frag - assets/shaders/ui_glitch.frag
codelabs/next-gen-ui/step_02_c/pubspec.yaml/0
{ "file_path": "codelabs/next-gen-ui/step_02_c/pubspec.yaml", "repo_id": "codelabs", "token_count": 444 }
144
// Copyright 2023 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #define M_PI 3.14159265 #define M_INVPI 0.31830989 float hash_1d(float v) { float u = 50.0 * sin(v * 3000.0); return 2.0 * fract(2.0 * u * u) - 1.0; } float hash_2d(vec2 pos) { vec2 uv = 50.0 * fract(pos * M_INVPI); return 2.0 * fract(uv.x * uv.y * (uv.x + uv.y)) - 1.0; }
codelabs/next-gen-ui/step_03_a/assets/shaders/common/common.glsl/0
{ "file_path": "codelabs/next-gen-ui/step_03_a/assets/shaders/common/common.glsl", "repo_id": "codelabs", "token_count": 189 }
145
// Copyright 2023 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'dart:math'; import 'package:flutter/material.dart'; class UiScaler extends StatelessWidget { const UiScaler({ super.key, required this.child, required this.alignment, this.referenceHeight = 1080, }); final int referenceHeight; final Widget child; final Alignment alignment; @override Widget build(BuildContext context) { final screenSize = MediaQuery.of(context).size; final double scale = min(screenSize.height / referenceHeight, 1.0); return Transform.scale( scale: scale, alignment: alignment, child: child, ); } }
codelabs/next-gen-ui/step_03_a/lib/common/ui_scaler.dart/0
{ "file_path": "codelabs/next-gen-ui/step_03_a/lib/common/ui_scaler.dart", "repo_id": "codelabs", "token_count": 251 }
146
// Copyright 2023 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #version 460 core #include "common/common.glsl" #include <flutter/runtime_effect.glsl> uniform vec2 uResolution; uniform float uTime; uniform sampler2D uTex; out vec4 oColor; float cubicPulse(float c, float w, float x) { x = abs(x - c); if (x > w) return 0.0; x /= w; return 1.0 - x*x*(3.0 - 2.0*x); } float twoSin(float x) { x = 6.49*x - 0.65; float t = -0.7*sin(6.8*x) + 1.4*sin(2.9*x); t = t/4.1 + 0.5; return t; } void main() { vec2 uv = vec2(FlutterFragCoord().xy) / uResolution; float t_2 = cubicPulse(.5, .05, fract(uTime / 4.0)); float t_1 = twoSin(fract(uTime / 5.0)); float glitchScale = mix(0.0, 8.0, t_1 + t_2); float aberrationSize = mix(0.0, 5.0, t_1 + t_2); float h = hash_1d(uv.y); float hs = sign(h); h = max(h, 0.0); h = h * h; h = round(h) * hs; uv += vec2(h * glitchScale, 0.0) / uResolution; vec2 redOffset = vec2(aberrationSize, 0.0) / uResolution; vec2 greenOffset = vec2(0.0, 0.0) / uResolution; vec2 blueOffset = vec2(-aberrationSize, 0.0) / uResolution; vec2 redUv = uv + redOffset; vec2 greenUv = uv + greenOffset; vec2 blueUv = uv + blueOffset; vec2 ra = texture(uTex, redUv).ra; vec2 ga = texture(uTex, greenUv).ga; vec2 ba = texture(uTex, blueUv).ba; // Convert from pre-multiplied alpha ra.x /= ra.y; ga.x /= ga.y; ba.x /= ba.y; float alpha = max(ra.y, max(ga.y, ba.y)); oColor = vec4(ra.x, ga.x, ba.x, 1.0) * alpha; }
codelabs/next-gen-ui/step_03_b/assets/shaders/ui_glitch.frag/0
{ "file_path": "codelabs/next-gen-ui/step_03_b/assets/shaders/ui_glitch.frag", "repo_id": "codelabs", "token_count": 716 }
147
// Copyright 2023 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/material.dart'; class OrbShaderConfig { const OrbShaderConfig({ this.zoom = 0.3, this.exposure = 0.4, this.roughness = 0.3, this.metalness = 0.3, this.materialColor = const Color.fromARGB(255, 242, 163, 138), this.lightRadius = 0.75, this.lightColor = const Color(0xFFFFFFFF), this.lightBrightness = 15.00, this.ior = 0.5, this.lightAttenuation = 0.5, this.ambientLightColor = const Color(0xFFFFFFFF), this.ambientLightBrightness = 0.2, this.ambientLightDepthFactor = 0.3, this.lightOffsetX = 0, this.lightOffsetY = 0.1, this.lightOffsetZ = -0.66, }) : assert(zoom >= 0 && zoom <= 1), assert(exposure >= 0), assert(metalness >= 0 && metalness <= 1), assert(lightRadius >= 0), assert(lightBrightness >= 1), assert(ior >= 0 && ior <= 2), assert(lightAttenuation >= 0 && lightAttenuation <= 1), assert(ambientLightBrightness >= 0); final double zoom; /// Camera exposure value, higher is brighter, 0 is black final double exposure; /// How rough the surface is, somewhat translates to the intensity/radius /// of specular highlights final double roughness; /// 0 for a dielectric material (plastic, wood, grass, water, etc...), /// 1 for a metal (iron, copper, aluminum, gold, etc...), a value in between /// blends the two materials (not really physically accurate, has minor /// artistic value) final double metalness; /// any color, alpha ignored, for metal materials doesn't correspond to /// surface color but to a reflectivity index based off of a 0 degree viewing /// angle (can look these values up online for various actual metals) final Color materialColor; /// The following light properties model a disk shaped light pointing /// at the sphere final double lightRadius; /// alpha ignored final Color lightColor; /// Light Brightness measured in luminous power (perceived total /// brightness of light, the larger the radius the more diffused the light /// power is for a given area) final double lightBrightness; /// 0..2, Index of refraction, higher value = more refraction, final double ior; /// Light attenuation factor, 0 for no attenuation, 1 is very fast attenuation final double lightAttenuation; /// alpha ignored final Color ambientLightColor; final double ambientLightBrightness; /// Modulates the ambient light brightness based off of the depth of the /// pixel. 1 means the ambient brightness factor at the front of the orb is 0, /// brightness factor at the back is 1. 0 means there's no change to the /// brightness factor based on depth final double ambientLightDepthFactor; /// Offset of the light relative to the center of the orb, +x is to the right final double lightOffsetX; /// Offset of the light relative to the center of the orb, +y is up final double lightOffsetY; /// Offset of the light relative to the center of the orb, +z is facing the camera final double lightOffsetZ; OrbShaderConfig copyWith({ double? zoom, double? exposure, double? roughness, double? metalness, Color? materialColor, double? lightRadius, Color? lightColor, double? lightBrightness, double? ior, double? lightAttenuation, Color? ambientLightColor, double? ambientLightBrightness, double? ambientLightDepthFactor, double? lightOffsetX, double? lightOffsetY, double? lightOffsetZ, }) { return OrbShaderConfig( zoom: zoom ?? this.zoom, exposure: exposure ?? this.exposure, roughness: roughness ?? this.roughness, metalness: metalness ?? this.metalness, materialColor: materialColor ?? this.materialColor, lightRadius: lightRadius ?? this.lightRadius, lightColor: lightColor ?? this.lightColor, lightBrightness: lightBrightness ?? this.lightBrightness, ior: ior ?? this.ior, lightAttenuation: lightAttenuation ?? this.lightAttenuation, ambientLightColor: ambientLightColor ?? this.ambientLightColor, ambientLightBrightness: ambientLightBrightness ?? this.ambientLightBrightness, ambientLightDepthFactor: ambientLightDepthFactor ?? this.ambientLightDepthFactor, lightOffsetX: lightOffsetX ?? this.lightOffsetX, lightOffsetY: lightOffsetY ?? this.lightOffsetY, lightOffsetZ: lightOffsetZ ?? this.lightOffsetZ, ); } }
codelabs/next-gen-ui/step_03_b/lib/orb_shader/orb_shader_config.dart/0
{ "file_path": "codelabs/next-gen-ui/step_03_b/lib/orb_shader/orb_shader_config.dart", "repo_id": "codelabs", "token_count": 1482 }
148
// Copyright 2023 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'dart:async'; import 'dart:math'; import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:provider/provider.dart'; import '../assets.dart'; import '../common/reactive_widget.dart'; import 'orb_shader_config.dart'; import 'orb_shader_painter.dart'; class OrbShaderWidget extends StatefulWidget { const OrbShaderWidget({ super.key, required this.config, this.onUpdate, required this.mousePos, required this.minEnergy, }); final double minEnergy; final OrbShaderConfig config; final Offset mousePos; final void Function(double energy)? onUpdate; @override State<OrbShaderWidget> createState() => OrbShaderWidgetState(); } class OrbShaderWidgetState extends State<OrbShaderWidget> with SingleTickerProviderStateMixin { final _heartbeatSequence = TweenSequence( [ TweenSequenceItem(tween: ConstantTween(0), weight: 40), TweenSequenceItem( tween: Tween(begin: 0.0, end: 1.0) .chain(CurveTween(curve: Curves.easeInOutCubic)), weight: 8), TweenSequenceItem( tween: Tween(begin: 1.0, end: 0.2) .chain(CurveTween(curve: Curves.easeInOutCubic)), weight: 12), TweenSequenceItem( tween: Tween(begin: 0.2, end: 0.8) .chain(CurveTween(curve: Curves.easeInOutCubic)), weight: 6), TweenSequenceItem( tween: Tween(begin: 0.8, end: 0.0) .chain(CurveTween(curve: Curves.easeInOutCubic)), weight: 10), ], ); late final _heartbeatAnim = AnimationController(vsync: this, duration: 3000.ms)..repeat(); @override Widget build(BuildContext context) => Consumer<FragmentPrograms?>( builder: (context, fragmentPrograms, _) { if (fragmentPrograms == null) return const SizedBox.expand(); return ListenableBuilder( listenable: _heartbeatAnim, builder: (_, __) { final heartbeatEnergy = _heartbeatAnim.drive(_heartbeatSequence).value; return TweenAnimationBuilder( tween: Tween<double>( begin: widget.minEnergy, end: widget.minEnergy), duration: 300.ms, curve: Curves.easeOutCubic, builder: (context, minEnergy, child) { return ReactiveWidget( builder: (context, time, size) { double energyLevel = 0; if (size.shortestSide != 0) { final d = (Offset(size.width, size.height) / 2 - widget.mousePos) .distance; final hitSize = size.shortestSide * .5; energyLevel = 1 - min(1, (d / hitSize)); scheduleMicrotask( () => widget.onUpdate?.call(energyLevel)); } energyLevel += (1.3 - energyLevel) * heartbeatEnergy * 0.1; energyLevel = lerpDouble(minEnergy, 1, energyLevel)!; return CustomPaint( size: size, painter: OrbShaderPainter( fragmentPrograms.orb.fragmentShader(), config: widget.config, time: time, mousePos: widget.mousePos, energy: energyLevel, ), ); }, ); }, ); }, ); }, ); }
codelabs/next-gen-ui/step_03_c/lib/orb_shader/orb_shader_widget.dart/0
{ "file_path": "codelabs/next-gen-ui/step_03_c/lib/orb_shader/orb_shader_widget.dart", "repo_id": "codelabs", "token_count": 2009 }
149
// // Generated file. Do not edit. // import FlutterMacOS import Foundation import window_size func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { WindowSizePlugin.register(with: registry.registrar(forPlugin: "WindowSizePlugin")) }
codelabs/next-gen-ui/step_03_c/macos/Flutter/GeneratedPluginRegistrant.swift/0
{ "file_path": "codelabs/next-gen-ui/step_03_c/macos/Flutter/GeneratedPluginRegistrant.swift", "repo_id": "codelabs", "token_count": 76 }
150
// Copyright 2023 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/material.dart'; import '../assets.dart'; import '../styles.dart'; import 'title_screen_ui.dart'; class TitleScreen extends StatefulWidget { const TitleScreen({super.key}); @override State<TitleScreen> createState() => _TitleScreenState(); } class _TitleScreenState extends State<TitleScreen> { Color get _emitColor => AppColors.emitColors[_difficultyOverride ?? _difficulty]; Color get _orbColor => AppColors.orbColors[_difficultyOverride ?? _difficulty]; /// Currently selected difficulty int _difficulty = 0; /// Currently focused difficulty (if any) int? _difficultyOverride; void _handleDifficultyPressed(int value) { setState(() => _difficulty = value); } void _handleDifficultyFocused(int? value) { setState(() => _difficultyOverride = value); } final _finalReceiveLightAmt = 0.7; final _finalEmitLightAmt = 0.5; @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.black, body: Center( child: Stack( children: [ /// Bg-Base Image.asset(AssetPaths.titleBgBase), /// Bg-Receive _LitImage( color: _orbColor, imgSrc: AssetPaths.titleBgReceive, lightAmt: _finalReceiveLightAmt, ), /// Mg-Base _LitImage( imgSrc: AssetPaths.titleMgBase, color: _orbColor, lightAmt: _finalReceiveLightAmt, ), /// Mg-Receive _LitImage( imgSrc: AssetPaths.titleMgReceive, color: _orbColor, lightAmt: _finalReceiveLightAmt, ), /// Mg-Emit _LitImage( imgSrc: AssetPaths.titleMgEmit, color: _emitColor, lightAmt: _finalEmitLightAmt, ), /// Fg-Rocks Image.asset(AssetPaths.titleFgBase), /// Fg-Receive _LitImage( imgSrc: AssetPaths.titleFgReceive, color: _orbColor, lightAmt: _finalReceiveLightAmt, ), /// Fg-Emit _LitImage( imgSrc: AssetPaths.titleFgEmit, color: _emitColor, lightAmt: _finalEmitLightAmt, ), /// UI Positioned.fill( child: TitleScreenUi( difficulty: _difficulty, onDifficultyFocused: _handleDifficultyFocused, onDifficultyPressed: _handleDifficultyPressed, ), ), ], ), ), ); } } class _LitImage extends StatelessWidget { const _LitImage({ required this.color, required this.imgSrc, required this.lightAmt, }); final Color color; final String imgSrc; final double lightAmt; @override Widget build(BuildContext context) { final hsl = HSLColor.fromColor(color); return Image.asset( imgSrc, color: hsl.withLightness(hsl.lightness * lightAmt).toColor(), colorBlendMode: BlendMode.modulate, ); } }
codelabs/next-gen-ui/step_04_a/lib/title_screen/title_screen.dart/0
{ "file_path": "codelabs/next-gen-ui/step_04_a/lib/title_screen/title_screen.dart", "repo_id": "codelabs", "token_count": 1609 }
151
#include "../../Flutter/Flutter-Debug.xcconfig" #include "Warnings.xcconfig"
codelabs/next-gen-ui/step_04_a/macos/Runner/Configs/Debug.xcconfig/0
{ "file_path": "codelabs/next-gen-ui/step_04_a/macos/Runner/Configs/Debug.xcconfig", "repo_id": "codelabs", "token_count": 32 }
152
include: ../../analysis_options.yaml analyzer: errors: unused_field: ignore unused_element: ignore
codelabs/next-gen-ui/step_04_d/analysis_options.yaml/0
{ "file_path": "codelabs/next-gen-ui/step_04_d/analysis_options.yaml", "repo_id": "codelabs", "token_count": 39 }
153
// Copyright 2023 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/material.dart'; import 'ticking_builder.dart'; typedef ReactiveWidgetBuilder = Widget Function( BuildContext context, double time, Size bounds); class ReactiveWidget extends StatefulWidget { const ReactiveWidget({ super.key, required this.builder, }); final ReactiveWidgetBuilder builder; @override State<ReactiveWidget> createState() => _ReactiveWidgetState(); } class _ReactiveWidgetState extends State<ReactiveWidget> { @override Widget build(BuildContext context) { return TickingBuilder( builder: (_, time) { return LayoutBuilder( builder: (context, constraints) { return widget.builder(context, time, constraints.biggest); }, ); }, ); } }
codelabs/next-gen-ui/step_04_d/lib/common/reactive_widget.dart/0
{ "file_path": "codelabs/next-gen-ui/step_04_d/lib/common/reactive_widget.dart", "repo_id": "codelabs", "token_count": 315 }
154
// Copyright 2023 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'dart:ui'; import 'package:flutter/material.dart'; class ShaderPainter extends CustomPainter { ShaderPainter(this.shader, {this.update}); final FragmentShader shader; final void Function(FragmentShader, Size)? update; @override void paint(Canvas canvas, Size size) { update?.call(shader, size); canvas.drawRect( Rect.fromLTWH(0, 0, size.width, size.height), Paint()..shader = shader, ); } @override bool shouldRepaint(covariant ShaderPainter oldDelegate) { return oldDelegate.shader != shader || oldDelegate.update != update; } }
codelabs/next-gen-ui/step_04_e/lib/common/shader_painter.dart/0
{ "file_path": "codelabs/next-gen-ui/step_04_e/lib/common/shader_painter.dart", "repo_id": "codelabs", "token_count": 257 }
155
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig"
codelabs/next-gen-ui/step_06/macos/Flutter/Flutter-Release.xcconfig/0
{ "file_path": "codelabs/next-gen-ui/step_06/macos/Flutter/Flutter-Release.xcconfig", "repo_id": "codelabs", "token_count": 48 }
156
package com.example.testing_app import io.flutter.embedding.android.FlutterActivity class MainActivity: FlutterActivity()
codelabs/testing_codelab/step_05/android/app/src/main/kotlin/com/example/testing_app/MainActivity.kt/0
{ "file_path": "codelabs/testing_codelab/step_05/android/app/src/main/kotlin/com/example/testing_app/MainActivity.kt", "repo_id": "codelabs", "token_count": 35 }
157
org.gradle.jvmargs=-Xmx4G android.useAndroidX=true android.enableJetifier=true
codelabs/testing_codelab/step_06/android/gradle.properties/0
{ "file_path": "codelabs/testing_codelab/step_06/android/gradle.properties", "repo_id": "codelabs", "token_count": 30 }
158
#import "GeneratedPluginRegistrant.h"
codelabs/testing_codelab/step_07/ios/Runner/Runner-Bridging-Header.h/0
{ "file_path": "codelabs/testing_codelab/step_07/ios/Runner/Runner-Bridging-Header.h", "repo_id": "codelabs", "token_count": 13 }
159
// Copyright 2020 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This is a basic Flutter widget test. // // To perform an interaction with a widget in your test, use the WidgetTester // utility in the flutter_test package. For example, you can send tap and scroll // gestures. You can also use WidgetTester to find child widgets in the widget // tree, read text, and verify that the values of widget properties are correct. import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:testing_app/main.dart'; void main() { testWidgets('Smoke test', (tester) async { await tester.pumpWidget(const TestingApp()); expect(find.byType(ListView), findsOneWidget); }); }
codelabs/testing_codelab/step_07/test/widget_test.dart/0
{ "file_path": "codelabs/testing_codelab/step_07/test/widget_test.dart", "repo_id": "codelabs", "token_count": 240 }
160
// Copyright 2021 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:testing_app/main.dart'; void main() { group('Testing App', () { testWidgets('Favorites operations test', (tester) async { await tester.pumpWidget(const TestingApp()); final iconKeys = [ 'icon_0', 'icon_1', 'icon_2', ]; for (var icon in iconKeys) { await tester.tap(find.byKey(ValueKey(icon))); await tester.pumpAndSettle(const Duration(seconds: 1)); expect(find.text('Added to favorites.'), findsOneWidget); } await tester.tap(find.text('Favorites')); await tester.pumpAndSettle(); final removeIconKeys = [ 'remove_icon_0', 'remove_icon_1', 'remove_icon_2', ]; for (final iconKey in removeIconKeys) { await tester.tap(find.byKey(ValueKey(iconKey))); await tester.pumpAndSettle(const Duration(seconds: 1)); expect(find.text('Removed from favorites.'), findsOneWidget); } }); }); }
codelabs/testing_codelab/step_08/integration_test/app_test.dart/0
{ "file_path": "codelabs/testing_codelab/step_08/integration_test/app_test.dart", "repo_id": "codelabs", "token_count": 502 }
161
include ':app' def localPropertiesFile = new File(rootProject.projectDir, "local.properties") def properties = new Properties() assert localPropertiesFile.exists() localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
codelabs/tfagents-flutter/step0/frontend/android/settings.gradle/0
{ "file_path": "codelabs/tfagents-flutter/step0/frontend/android/settings.gradle", "repo_id": "codelabs", "token_count": 142 }
162
package com.example.frontend import io.flutter.embedding.android.FlutterActivity class MainActivity: FlutterActivity() { }
codelabs/tfagents-flutter/step2/frontend/android/app/src/main/kotlin/com/example/frontend/MainActivity.kt/0
{ "file_path": "codelabs/tfagents-flutter/step2/frontend/android/app/src/main/kotlin/com/example/frontend/MainActivity.kt", "repo_id": "codelabs", "token_count": 37 }
163
#Fri Jun 23 08:50:38 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
codelabs/tfagents-flutter/step3/frontend/android/gradle/wrapper/gradle-wrapper.properties/0
{ "file_path": "codelabs/tfagents-flutter/step3/frontend/android/gradle/wrapper/gradle-wrapper.properties", "repo_id": "codelabs", "token_count": 84 }
164
# frontend A new Flutter project. ## Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this is your first Flutter project: - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) For help getting started with Flutter development, view our [online documentation](https://docs.flutter.dev), which offers tutorials, samples, guidance on mobile development, and a full API reference.
codelabs/tfagents-flutter/step4/frontend/README.md/0
{ "file_path": "codelabs/tfagents-flutter/step4/frontend/README.md", "repo_id": "codelabs", "token_count": 148 }
165
<?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"> <plist version="1.0"> <dict> <key>com.apple.security.app-sandbox</key> <true/> <key>com.apple.security.network.client</key> <true/> </dict> </plist>
codelabs/tfagents-flutter/step4/frontend/macos/Runner/Release.entitlements/0
{ "file_path": "codelabs/tfagents-flutter/step4/frontend/macos/Runner/Release.entitlements", "repo_id": "codelabs", "token_count": 131 }
166
#import "GeneratedPluginRegistrant.h"
codelabs/tfagents-flutter/step6/frontend/ios/Runner/Runner-Bridging-Header.h/0
{ "file_path": "codelabs/tfagents-flutter/step6/frontend/ios/Runner/Runner-Bridging-Header.h", "repo_id": "codelabs", "token_count": 13 }
167
#include "../../Flutter/Flutter-Debug.xcconfig" #include "Warnings.xcconfig"
codelabs/tfagents-flutter/step6/frontend/macos/Runner/Configs/Debug.xcconfig/0
{ "file_path": "codelabs/tfagents-flutter/step6/frontend/macos/Runner/Configs/Debug.xcconfig", "repo_id": "codelabs", "token_count": 32 }
168
include: ../../../analysis_options.yaml analyzer: linter: rules:
codelabs/tfrs-flutter/finished/frontend/analysis_options.yaml/0
{ "file_path": "codelabs/tfrs-flutter/finished/frontend/analysis_options.yaml", "repo_id": "codelabs", "token_count": 26 }
169
buildscript { ext.kotlin_version = '1.6.10' repositories { google() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:4.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } allprojects { repositories { google() mavenCentral() } } rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') } task clean(type: Delete) { delete rootProject.buildDir }
codelabs/tfrs-flutter/finished/frontend/android/build.gradle/0
{ "file_path": "codelabs/tfrs-flutter/finished/frontend/android/build.gradle", "repo_id": "codelabs", "token_count": 258 }
170
// This is a basic Flutter widget test. // // To perform an interaction with a widget in your test, use the WidgetTester // utility that Flutter provides. For example, you can send tap and scroll // gestures. You can also use WidgetTester to find child widgets in the widget // tree, read text, and verify that the values of widget properties are correct. import 'package:flutter_test/flutter_test.dart'; import 'package:recommend_products/main.dart'; void main() { testWidgets('Smoke test', (tester) async { // Build our app and trigger a frame. await tester.pumpWidget(const RecommenderDemo()); // Verify that the widgets are there expect(find.text('Recommend'), findsOneWidget); }); }
codelabs/tfrs-flutter/finished/frontend/test/widget_test.dart/0
{ "file_path": "codelabs/tfrs-flutter/finished/frontend/test/widget_test.dart", "repo_id": "codelabs", "token_count": 207 }
171
from flask import Flask from flask_cors import CORS from flask import jsonify, make_response, request import json, requests import numpy as np RETRIEVAL_URL = "http://localhost:8501/v1/models/retrieval:predict" RANKING_URL = "http://localhost:8501/v1/models/ranking:predict" NUM_OF_CANDIDATES = 10 app = Flask(__name__) CORS(app) @app.route("/recommend", methods=["POST"]) def get_recommendations(): # TODO: add code to chain the retrieval and ranking model, and return the # ranked list of movies return None if __name__ == "__main__": app.run(debug=True)
codelabs/tfrs-flutter/step0/backend/recommender.py/0
{ "file_path": "codelabs/tfrs-flutter/step0/backend/recommender.py", "repo_id": "codelabs", "token_count": 209 }
172
#import "GeneratedPluginRegistrant.h"
codelabs/tfrs-flutter/step0/frontend/ios/Runner/Runner-Bridging-Header.h/0
{ "file_path": "codelabs/tfrs-flutter/step0/frontend/ios/Runner/Runner-Bridging-Header.h", "repo_id": "codelabs", "token_count": 13 }
173
#include "../../Flutter/Flutter-Release.xcconfig" #include "Warnings.xcconfig"
codelabs/tfrs-flutter/step0/frontend/macos/Runner/Configs/Release.xcconfig/0
{ "file_path": "codelabs/tfrs-flutter/step0/frontend/macos/Runner/Configs/Release.xcconfig", "repo_id": "codelabs", "token_count": 32 }
174
model_config_list { config { name: 'retrieval' base_path: '/models/retrieval/exported-retrieval' model_platform: 'tensorflow' } config { name: 'ranking' base_path: '/models/ranking/exported-ranking' model_platform: 'tensorflow' } }
codelabs/tfrs-flutter/step3/backend/models.config/0
{ "file_path": "codelabs/tfrs-flutter/step3/backend/models.config", "repo_id": "codelabs", "token_count": 109 }
175
<jupyter_start><jupyter_text>Copyright 2022 The TensorFlow Authors.<jupyter_code>#@title Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.<jupyter_output><empty_output><jupyter_text>Recommending movies: retrievalThis tutorial is a slightly adapted version of the [basic retrieval tutorial](https://www.tensorflow.org/recommenders/examples/basic_retrievalfitting_and_evaluating) from TensorFlow Recommenders documentation. ImportsLet's first get our imports out of the way.<jupyter_code>!pip install -q tensorflow-recommenders !pip install -q --upgrade tensorflow-datasets import datetime import os import pprint import tempfile from typing import Dict, Text import numpy as np import tensorflow as tf import tensorflow_datasets as tfds import tensorflow_recommenders as tfrs<jupyter_output><empty_output><jupyter_text>Preparing the dataset<jupyter_code># Ratings data. ratings = tfds.load("movielens/100k-ratings", split="train") # Features of all the available movies. movies = tfds.load("movielens/100k-movies", split="train") # Keep only 'movie_title' and 'user_id' ratings = ratings.map(lambda x: { "movie_title": x["movie_title"], "user_id": x["user_id"], }) movies = movies.map(lambda x: x["movie_title"])<jupyter_output><empty_output><jupyter_text>Let's use a random split, putting 80% of the ratings in the train set, and 20% in the test set.<jupyter_code>tf.random.set_seed(42) shuffled = ratings.shuffle(100_000, seed=42, reshuffle_each_iteration=False) train = shuffled.take(80_000) test = shuffled.skip(80_000).take(20_000)<jupyter_output><empty_output><jupyter_text>Next we figure out unique user ids and movie titles present in the data so that we can create the embedding user and movie embedding tables.<jupyter_code>movie_titles = movies.batch(1_000) user_ids = ratings.batch(1_000_000).map(lambda x: x["user_id"]) unique_movie_titles = np.unique(np.concatenate(list(movie_titles))) unique_user_ids = np.unique(np.concatenate(list(user_ids)))<jupyter_output><empty_output><jupyter_text>Implementing a retrieval modelWe are going to building a two-tower retrieval model by building each tower separately and then combining them in the final model. The query towerThe first step is to decide on the dimensionality of the query and candidate representations:<jupyter_code>embedding_dimension = 32<jupyter_output><empty_output><jupyter_text>The second is to define the model itself.<jupyter_code>user_model = tf.keras.Sequential([ tf.keras.layers.StringLookup( vocabulary=unique_user_ids, mask_token=None), # We add an additional embedding to account for unknown tokens. tf.keras.layers.Embedding(len(unique_user_ids) + 1, embedding_dimension) ])<jupyter_output><empty_output><jupyter_text>The candidate towerWe can do the same with the candidate tower.<jupyter_code>movie_model = tf.keras.Sequential([ tf.keras.layers.StringLookup( vocabulary=unique_movie_titles, mask_token=None), tf.keras.layers.Embedding(len(unique_movie_titles) + 1, embedding_dimension) ])<jupyter_output><empty_output><jupyter_text>MetricsWe use the `tfrs.metrics.FactorizedTopK` metric for our retrieval model.<jupyter_code>metrics = tfrs.metrics.FactorizedTopK( candidates=movies.batch(128).map(movie_model) )<jupyter_output><empty_output><jupyter_text>LossThe next component is the loss used to train our model. We'll make use of the `Retrieval` task object: a convenience wrapper that bundles together the loss function and metric computation:<jupyter_code>task = tfrs.tasks.Retrieval( metrics=metrics )<jupyter_output><empty_output><jupyter_text>The full modelWe can now put it all together into a model.<jupyter_code>class MovielensModel(tfrs.Model): def __init__(self, user_model, movie_model): super().__init__() self.movie_model: tf.keras.Model = movie_model self.user_model: tf.keras.Model = user_model self.task: tf.keras.layers.Layer = task def compute_loss(self, features: Dict[Text, tf.Tensor], training=False) -> tf.Tensor: # We pick out the user features and pass them into the user model. user_embeddings = self.user_model(features["user_id"]) # And pick out the movie features and pass them into the movie model, # getting embeddings back. positive_movie_embeddings = self.movie_model(features["movie_title"]) # The task computes the loss and the metrics. return self.task(user_embeddings, positive_movie_embeddings)<jupyter_output><empty_output><jupyter_text>Fitting and evaluatingLet's instantiate the model now.<jupyter_code>model = MovielensModel(user_model, movie_model) model.compile(optimizer=tf.keras.optimizers.Adagrad(learning_rate=0.1))<jupyter_output><empty_output><jupyter_text>Then shuffle, batch, and cache the training and evaluation data.<jupyter_code>cached_train = train.shuffle(100_000).batch(8192).cache() cached_test = test.batch(4096).cache()<jupyter_output><empty_output><jupyter_text>Then train the model:<jupyter_code>model.fit(cached_train, epochs=3)<jupyter_output><empty_output><jupyter_text>Finally, we can evaluate our model on the test set:<jupyter_code>model.evaluate(cached_test, return_dict=True)<jupyter_output><empty_output><jupyter_text>Making predictionsNow that we have a model, we would like to be able to make predictions. We can use the `tfrs.layers.factorized_top_k.BruteForce` layer to do this.<jupyter_code># Create a model that takes in raw query features, and index = tfrs.layers.factorized_top_k.BruteForce(model.user_model) # recommends movies out of the entire movies dataset. index.index_from_dataset( tf.data.Dataset.zip((movies.batch(100), movies.batch(100).map(model.movie_model))) ) # Get recommendations. _, titles = index(tf.constant(["42"])) print(f"Recommendations for user 42: {titles[0, :3]}")<jupyter_output><empty_output><jupyter_text>If you want to leverage ANN techniques to speed up predictions, please check out the [Efficient serving](https://www.tensorflow.org/recommenders/examples/efficient_serving) tutorial. Exporting the modelWe simply export the `BruteForce` layer we created above:<jupyter_code># Export the query model. tf.saved_model.save(index, "exported-retrieval/123")<jupyter_output><empty_output><jupyter_text>We will deploy the model with TensorFlow Serving soon.<jupyter_code># Zip the SavedModel folder for easier download !zip -r exported-retrieval.zip exported-retrieval/<jupyter_output><empty_output>
codelabs/tfrs-flutter/step4/backend/retrieval/retrieval.ipynb/0
{ "file_path": "codelabs/tfrs-flutter/step4/backend/retrieval/retrieval.ipynb", "repo_id": "codelabs", "token_count": 2257 }
176
import Cocoa import FlutterMacOS class MainFlutterWindow: NSWindow { override func awakeFromNib() { let flutterViewController = FlutterViewController.init() let windowFrame = self.frame self.contentViewController = flutterViewController self.setFrame(windowFrame, display: true) RegisterGeneratedPlugins(registry: flutterViewController) super.awakeFromNib() } }
codelabs/tfrs-flutter/step4/frontend/macos/Runner/MainFlutterWindow.swift/0
{ "file_path": "codelabs/tfrs-flutter/step4/frontend/macos/Runner/MainFlutterWindow.swift", "repo_id": "codelabs", "token_count": 124 }
177
#include "Generated.xcconfig"
codelabs/tfrs-flutter/step5/frontend/ios/Flutter/Debug.xcconfig/0
{ "file_path": "codelabs/tfrs-flutter/step5/frontend/ios/Flutter/Debug.xcconfig", "repo_id": "codelabs", "token_count": 12 }
178
#include "ephemeral/Flutter-Generated.xcconfig"
codelabs/tfrs-flutter/step5/frontend/macos/Flutter/Flutter-Release.xcconfig/0
{ "file_path": "codelabs/tfrs-flutter/step5/frontend/macos/Flutter/Flutter-Release.xcconfig", "repo_id": "codelabs", "token_count": 19 }
179
<!DOCTYPE html> <html> <head> <!-- If you are serving your web app in a path other than the root, change the href value below to reflect the base path you are serving from. The path provided below has to start and end with a slash "/" in order for it to work correctly. For more details: * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base This is a placeholder for base href that will be replaced by the value of the `--base-href` argument provided to `flutter build`. --> <base href="$FLUTTER_BASE_HREF"> <meta charset="UTF-8"> <meta content="IE=Edge" http-equiv="X-UA-Compatible"> <meta name="description" content="A new Flutter project."> <!-- iOS meta tags & icons --> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="apple-mobile-web-app-title" content="recommend_products"> <link rel="apple-touch-icon" href="icons/Icon-192.png"> <!-- Favicon --> <link rel="icon" type="image/png" href="favicon.png"/> <title>recommend_products</title> <link rel="manifest" href="manifest.json"> </head> <body> <!-- This script installs service_worker.js to provide PWA functionality to application. For more information, see: https://developers.google.com/web/fundamentals/primers/service-workers --> <script> var serviceWorkerVersion = null; var scriptLoaded = false; function loadMainDartJs() { if (scriptLoaded) { return; } scriptLoaded = true; var scriptTag = document.createElement('script'); scriptTag.src = 'main.dart.js'; scriptTag.type = 'application/javascript'; document.body.append(scriptTag); } if ('serviceWorker' in navigator) { // Service workers are supported. Use them. window.addEventListener('load', function () { // Wait for registration to finish before dropping the <script> tag. // Otherwise, the browser will load the script multiple times, // potentially different versions. var serviceWorkerUrl = 'flutter_service_worker.js?v=' + serviceWorkerVersion; navigator.serviceWorker.register(serviceWorkerUrl) .then((reg) => { function waitForActivation(serviceWorker) { serviceWorker.addEventListener('statechange', () => { if (serviceWorker.state == 'activated') { console.log('Installed new service worker.'); loadMainDartJs(); } }); } if (!reg.active && (reg.installing || reg.waiting)) { // No active web worker and we have installed or are installing // one for the first time. Simply wait for it to activate. waitForActivation(reg.installing || reg.waiting); } else if (!reg.active.scriptURL.endsWith(serviceWorkerVersion)) { // When the app updates the serviceWorkerVersion changes, so we // need to ask the service worker to update. console.log('New service worker available.'); reg.update(); waitForActivation(reg.installing); } else { // Existing service worker is still good. console.log('Loading app from service worker.'); loadMainDartJs(); } }); // If service worker doesn't succeed in a reasonable amount of time, // fallback to plaint <script> tag. setTimeout(() => { if (!scriptLoaded) { console.warn( 'Failed to load app from service worker. Falling back to plain <script> tag.', ); loadMainDartJs(); } }, 4000); }); } else { // Service workers not supported. Just drop the <script> tag. loadMainDartJs(); } </script> </body> </html>
codelabs/tfrs-flutter/step5/frontend/web/index.html/0
{ "file_path": "codelabs/tfrs-flutter/step5/frontend/web/index.html", "repo_id": "codelabs", "token_count": 1568 }
180
org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true
codelabs/tfserving-flutter/codelab2/finished/android/gradle.properties/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/finished/android/gradle.properties", "repo_id": "codelabs", "token_count": 31 }
181
/// // Generated code. Do not modify. // source: google/protobuf/any.proto // // @dart = 2.12 // ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package import 'dart:core' as $core; import 'dart:convert' as $convert; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use anyDescriptor instead') const Any$json = const { '1': 'Any', '2': const [ const {'1': 'type_url', '3': 1, '4': 1, '5': 9, '10': 'typeUrl'}, const {'1': 'value', '3': 2, '4': 1, '5': 12, '10': 'value'}, ], }; /// Descriptor for `Any`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List anyDescriptor = $convert.base64Decode( 'CgNBbnkSGQoIdHlwZV91cmwYASABKAlSB3R5cGVVcmwSFAoFdmFsdWUYAiABKAxSBXZhbHVl');
codelabs/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/any.pbjson.dart/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/any.pbjson.dart", "repo_id": "codelabs", "token_count": 398 }
182
/// // Generated code. Do not modify. // source: tensorflow/core/framework/function.proto // // @dart = 2.12 // ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; import 'op_def.pb.dart' as $0; import 'node_def.pb.dart' as $1; import 'attr_value.pb.dart' as $2; class FunctionDefLibrary extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'FunctionDefLibrary', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow'), createEmptyInstance: create) ..pc<FunctionDef>( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'function', $pb.PbFieldType.PM, subBuilder: FunctionDef.create) ..pc<GradientDef>( 2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'gradient', $pb.PbFieldType.PM, subBuilder: GradientDef.create) ..pc<RegisteredGradient>( 3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'registeredGradients', $pb.PbFieldType.PM, subBuilder: RegisteredGradient.create) ..hasRequiredFields = false; FunctionDefLibrary._() : super(); factory FunctionDefLibrary({ $core.Iterable<FunctionDef>? function, $core.Iterable<GradientDef>? gradient, $core.Iterable<RegisteredGradient>? registeredGradients, }) { final _result = create(); if (function != null) { _result.function.addAll(function); } if (gradient != null) { _result.gradient.addAll(gradient); } if (registeredGradients != null) { _result.registeredGradients.addAll(registeredGradients); } return _result; } factory FunctionDefLibrary.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory FunctionDefLibrary.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') FunctionDefLibrary clone() => FunctionDefLibrary()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') FunctionDefLibrary copyWith(void Function(FunctionDefLibrary) updates) => super.copyWith((message) => updates(message as FunctionDefLibrary)) as FunctionDefLibrary; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static FunctionDefLibrary create() => FunctionDefLibrary._(); FunctionDefLibrary createEmptyInstance() => create(); static $pb.PbList<FunctionDefLibrary> createRepeated() => $pb.PbList<FunctionDefLibrary>(); @$core.pragma('dart2js:noInline') static FunctionDefLibrary getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<FunctionDefLibrary>(create); static FunctionDefLibrary? _defaultInstance; @$pb.TagNumber(1) $core.List<FunctionDef> get function => $_getList(0); @$pb.TagNumber(2) $core.List<GradientDef> get gradient => $_getList(1); @$pb.TagNumber(3) $core.List<RegisteredGradient> get registeredGradients => $_getList(2); } class FunctionDef_ArgAttrs extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'FunctionDef.ArgAttrs', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow'), createEmptyInstance: create) ..m<$core.String, $2.AttrValue>( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'attr', entryClassName: 'FunctionDef.ArgAttrs.AttrEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: $2.AttrValue.create, packageName: const $pb.PackageName('tensorflow')) ..hasRequiredFields = false; FunctionDef_ArgAttrs._() : super(); factory FunctionDef_ArgAttrs({ $core.Map<$core.String, $2.AttrValue>? attr, }) { final _result = create(); if (attr != null) { _result.attr.addAll(attr); } return _result; } factory FunctionDef_ArgAttrs.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory FunctionDef_ArgAttrs.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') FunctionDef_ArgAttrs clone() => FunctionDef_ArgAttrs()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') FunctionDef_ArgAttrs copyWith(void Function(FunctionDef_ArgAttrs) updates) => super.copyWith((message) => updates(message as FunctionDef_ArgAttrs)) as FunctionDef_ArgAttrs; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static FunctionDef_ArgAttrs create() => FunctionDef_ArgAttrs._(); FunctionDef_ArgAttrs createEmptyInstance() => create(); static $pb.PbList<FunctionDef_ArgAttrs> createRepeated() => $pb.PbList<FunctionDef_ArgAttrs>(); @$core.pragma('dart2js:noInline') static FunctionDef_ArgAttrs getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<FunctionDef_ArgAttrs>(create); static FunctionDef_ArgAttrs? _defaultInstance; @$pb.TagNumber(1) $core.Map<$core.String, $2.AttrValue> get attr => $_getMap(0); } class FunctionDef extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'FunctionDef', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow'), createEmptyInstance: create) ..aOM<$0.OpDef>( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signature', subBuilder: $0.OpDef.create) ..pc<$1.NodeDef>( 3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'nodeDef', $pb.PbFieldType.PM, subBuilder: $1.NodeDef.create) ..m<$core.String, $core.String>( 4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'ret', entryClassName: 'FunctionDef.RetEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('tensorflow')) ..m<$core.String, $2.AttrValue>( 5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'attr', entryClassName: 'FunctionDef.AttrEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: $2.AttrValue.create, packageName: const $pb.PackageName('tensorflow')) ..m<$core.String, $core.String>( 6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'controlRet', entryClassName: 'FunctionDef.ControlRetEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('tensorflow')) ..m<$core.int, FunctionDef_ArgAttrs>( 7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'argAttr', entryClassName: 'FunctionDef.ArgAttrEntry', keyFieldType: $pb.PbFieldType.OU3, valueFieldType: $pb.PbFieldType.OM, valueCreator: FunctionDef_ArgAttrs.create, packageName: const $pb.PackageName('tensorflow')) ..m<$core.int, $core.int>( 8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'resourceArgUniqueId', entryClassName: 'FunctionDef.ResourceArgUniqueIdEntry', keyFieldType: $pb.PbFieldType.OU3, valueFieldType: $pb.PbFieldType.OU3, packageName: const $pb.PackageName('tensorflow')) ..hasRequiredFields = false; FunctionDef._() : super(); factory FunctionDef({ $0.OpDef? signature, $core.Iterable<$1.NodeDef>? nodeDef, $core.Map<$core.String, $core.String>? ret, $core.Map<$core.String, $2.AttrValue>? attr, $core.Map<$core.String, $core.String>? controlRet, $core.Map<$core.int, FunctionDef_ArgAttrs>? argAttr, $core.Map<$core.int, $core.int>? resourceArgUniqueId, }) { final _result = create(); if (signature != null) { _result.signature = signature; } if (nodeDef != null) { _result.nodeDef.addAll(nodeDef); } if (ret != null) { _result.ret.addAll(ret); } if (attr != null) { _result.attr.addAll(attr); } if (controlRet != null) { _result.controlRet.addAll(controlRet); } if (argAttr != null) { _result.argAttr.addAll(argAttr); } if (resourceArgUniqueId != null) { _result.resourceArgUniqueId.addAll(resourceArgUniqueId); } return _result; } factory FunctionDef.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory FunctionDef.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') FunctionDef clone() => FunctionDef()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') FunctionDef copyWith(void Function(FunctionDef) updates) => super.copyWith((message) => updates(message as FunctionDef)) as FunctionDef; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static FunctionDef create() => FunctionDef._(); FunctionDef createEmptyInstance() => create(); static $pb.PbList<FunctionDef> createRepeated() => $pb.PbList<FunctionDef>(); @$core.pragma('dart2js:noInline') static FunctionDef getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<FunctionDef>(create); static FunctionDef? _defaultInstance; @$pb.TagNumber(1) $0.OpDef get signature => $_getN(0); @$pb.TagNumber(1) set signature($0.OpDef v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasSignature() => $_has(0); @$pb.TagNumber(1) void clearSignature() => clearField(1); @$pb.TagNumber(1) $0.OpDef ensureSignature() => $_ensure(0); @$pb.TagNumber(3) $core.List<$1.NodeDef> get nodeDef => $_getList(1); @$pb.TagNumber(4) $core.Map<$core.String, $core.String> get ret => $_getMap(2); @$pb.TagNumber(5) $core.Map<$core.String, $2.AttrValue> get attr => $_getMap(3); @$pb.TagNumber(6) $core.Map<$core.String, $core.String> get controlRet => $_getMap(4); @$pb.TagNumber(7) $core.Map<$core.int, FunctionDef_ArgAttrs> get argAttr => $_getMap(5); @$pb.TagNumber(8) $core.Map<$core.int, $core.int> get resourceArgUniqueId => $_getMap(6); } class GradientDef extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GradientDef', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow'), createEmptyInstance: create) ..aOS( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'functionName') ..aOS( 2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'gradientFunc') ..hasRequiredFields = false; GradientDef._() : super(); factory GradientDef({ $core.String? functionName, $core.String? gradientFunc, }) { final _result = create(); if (functionName != null) { _result.functionName = functionName; } if (gradientFunc != null) { _result.gradientFunc = gradientFunc; } return _result; } factory GradientDef.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory GradientDef.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') GradientDef clone() => GradientDef()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') GradientDef copyWith(void Function(GradientDef) updates) => super.copyWith((message) => updates(message as GradientDef)) as GradientDef; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static GradientDef create() => GradientDef._(); GradientDef createEmptyInstance() => create(); static $pb.PbList<GradientDef> createRepeated() => $pb.PbList<GradientDef>(); @$core.pragma('dart2js:noInline') static GradientDef getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<GradientDef>(create); static GradientDef? _defaultInstance; @$pb.TagNumber(1) $core.String get functionName => $_getSZ(0); @$pb.TagNumber(1) set functionName($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasFunctionName() => $_has(0); @$pb.TagNumber(1) void clearFunctionName() => clearField(1); @$pb.TagNumber(2) $core.String get gradientFunc => $_getSZ(1); @$pb.TagNumber(2) set gradientFunc($core.String v) { $_setString(1, v); } @$pb.TagNumber(2) $core.bool hasGradientFunc() => $_has(1); @$pb.TagNumber(2) void clearGradientFunc() => clearField(2); } class RegisteredGradient extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RegisteredGradient', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow'), createEmptyInstance: create) ..aOS( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'gradientFunc') ..aOS( 2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'registeredOpType') ..hasRequiredFields = false; RegisteredGradient._() : super(); factory RegisteredGradient({ $core.String? gradientFunc, $core.String? registeredOpType, }) { final _result = create(); if (gradientFunc != null) { _result.gradientFunc = gradientFunc; } if (registeredOpType != null) { _result.registeredOpType = registeredOpType; } return _result; } factory RegisteredGradient.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory RegisteredGradient.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') RegisteredGradient clone() => RegisteredGradient()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') RegisteredGradient copyWith(void Function(RegisteredGradient) updates) => super.copyWith((message) => updates(message as RegisteredGradient)) as RegisteredGradient; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static RegisteredGradient create() => RegisteredGradient._(); RegisteredGradient createEmptyInstance() => create(); static $pb.PbList<RegisteredGradient> createRepeated() => $pb.PbList<RegisteredGradient>(); @$core.pragma('dart2js:noInline') static RegisteredGradient getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<RegisteredGradient>(create); static RegisteredGradient? _defaultInstance; @$pb.TagNumber(1) $core.String get gradientFunc => $_getSZ(0); @$pb.TagNumber(1) set gradientFunc($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasGradientFunc() => $_has(0); @$pb.TagNumber(1) void clearGradientFunc() => clearField(1); @$pb.TagNumber(2) $core.String get registeredOpType => $_getSZ(1); @$pb.TagNumber(2) set registeredOpType($core.String v) { $_setString(1, v); } @$pb.TagNumber(2) $core.bool hasRegisteredOpType() => $_has(1); @$pb.TagNumber(2) void clearRegisteredOpType() => clearField(2); }
codelabs/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/function.pb.dart/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/function.pb.dart", "repo_id": "codelabs", "token_count": 7680 }
183
/// // Generated code. Do not modify. // source: tensorflow/core/framework/tensor.proto // // @dart = 2.12 // ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields
codelabs/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/tensor.pbenum.dart/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/tensor.pbenum.dart", "repo_id": "codelabs", "token_count": 116 }
184
/// // Generated code. Do not modify. // source: tensorflow_serving/apis/get_model_metadata.proto // // @dart = 2.12 // ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; import '../../tensorflow/core/protobuf/meta_graph.pb.dart' as $0; import 'model.pb.dart' as $1; import '../../google/protobuf/any.pb.dart' as $2; class SignatureDefMap extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignatureDefMap', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow.serving'), createEmptyInstance: create) ..m<$core.String, $0.SignatureDef>( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signatureDef', entryClassName: 'SignatureDefMap.SignatureDefEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: $0.SignatureDef.create, packageName: const $pb.PackageName('tensorflow.serving')) ..hasRequiredFields = false; SignatureDefMap._() : super(); factory SignatureDefMap({ $core.Map<$core.String, $0.SignatureDef>? signatureDef, }) { final _result = create(); if (signatureDef != null) { _result.signatureDef.addAll(signatureDef); } return _result; } factory SignatureDefMap.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory SignatureDefMap.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') SignatureDefMap clone() => SignatureDefMap()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') SignatureDefMap copyWith(void Function(SignatureDefMap) updates) => super.copyWith((message) => updates(message as SignatureDefMap)) as SignatureDefMap; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SignatureDefMap create() => SignatureDefMap._(); SignatureDefMap createEmptyInstance() => create(); static $pb.PbList<SignatureDefMap> createRepeated() => $pb.PbList<SignatureDefMap>(); @$core.pragma('dart2js:noInline') static SignatureDefMap getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SignatureDefMap>(create); static SignatureDefMap? _defaultInstance; @$pb.TagNumber(1) $core.Map<$core.String, $0.SignatureDef> get signatureDef => $_getMap(0); } class GetModelMetadataRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetModelMetadataRequest', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow.serving'), createEmptyInstance: create) ..aOM<$1.ModelSpec>( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'modelSpec', subBuilder: $1.ModelSpec.create) ..pPS( 2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'metadataField') ..hasRequiredFields = false; GetModelMetadataRequest._() : super(); factory GetModelMetadataRequest({ $1.ModelSpec? modelSpec, $core.Iterable<$core.String>? metadataField, }) { final _result = create(); if (modelSpec != null) { _result.modelSpec = modelSpec; } if (metadataField != null) { _result.metadataField.addAll(metadataField); } return _result; } factory GetModelMetadataRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory GetModelMetadataRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') GetModelMetadataRequest clone() => GetModelMetadataRequest()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') GetModelMetadataRequest copyWith( void Function(GetModelMetadataRequest) updates) => super.copyWith((message) => updates(message as GetModelMetadataRequest)) as GetModelMetadataRequest; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static GetModelMetadataRequest create() => GetModelMetadataRequest._(); GetModelMetadataRequest createEmptyInstance() => create(); static $pb.PbList<GetModelMetadataRequest> createRepeated() => $pb.PbList<GetModelMetadataRequest>(); @$core.pragma('dart2js:noInline') static GetModelMetadataRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<GetModelMetadataRequest>(create); static GetModelMetadataRequest? _defaultInstance; @$pb.TagNumber(1) $1.ModelSpec get modelSpec => $_getN(0); @$pb.TagNumber(1) set modelSpec($1.ModelSpec v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasModelSpec() => $_has(0); @$pb.TagNumber(1) void clearModelSpec() => clearField(1); @$pb.TagNumber(1) $1.ModelSpec ensureModelSpec() => $_ensure(0); @$pb.TagNumber(2) $core.List<$core.String> get metadataField => $_getList(1); } class GetModelMetadataResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetModelMetadataResponse', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow.serving'), createEmptyInstance: create) ..aOM<$1.ModelSpec>( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'modelSpec', subBuilder: $1.ModelSpec.create) ..m<$core.String, $2.Any>( 2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'metadata', entryClassName: 'GetModelMetadataResponse.MetadataEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: $2.Any.create, packageName: const $pb.PackageName('tensorflow.serving')) ..hasRequiredFields = false; GetModelMetadataResponse._() : super(); factory GetModelMetadataResponse({ $1.ModelSpec? modelSpec, $core.Map<$core.String, $2.Any>? metadata, }) { final _result = create(); if (modelSpec != null) { _result.modelSpec = modelSpec; } if (metadata != null) { _result.metadata.addAll(metadata); } return _result; } factory GetModelMetadataResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory GetModelMetadataResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') GetModelMetadataResponse clone() => GetModelMetadataResponse()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') GetModelMetadataResponse copyWith( void Function(GetModelMetadataResponse) updates) => super.copyWith((message) => updates(message as GetModelMetadataResponse)) as GetModelMetadataResponse; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static GetModelMetadataResponse create() => GetModelMetadataResponse._(); GetModelMetadataResponse createEmptyInstance() => create(); static $pb.PbList<GetModelMetadataResponse> createRepeated() => $pb.PbList<GetModelMetadataResponse>(); @$core.pragma('dart2js:noInline') static GetModelMetadataResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<GetModelMetadataResponse>(create); static GetModelMetadataResponse? _defaultInstance; @$pb.TagNumber(1) $1.ModelSpec get modelSpec => $_getN(0); @$pb.TagNumber(1) set modelSpec($1.ModelSpec v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasModelSpec() => $_has(0); @$pb.TagNumber(1) void clearModelSpec() => clearField(1); @$pb.TagNumber(1) $1.ModelSpec ensureModelSpec() => $_ensure(0); @$pb.TagNumber(2) $core.Map<$core.String, $2.Any> get metadata => $_getMap(1); }
codelabs/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow_serving/apis/get_model_metadata.pb.dart/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow_serving/apis/get_model_metadata.pb.dart", "repo_id": "codelabs", "token_count": 3886 }
185
/// // Generated code. Do not modify. // source: tensorflow_serving/apis/prediction_service.proto // // @dart = 2.12 // ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields
codelabs/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow_serving/apis/prediction_service.pbenum.dart/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow_serving/apis/prediction_service.pbenum.dart", "repo_id": "codelabs", "token_count": 119 }
186
syntax = "proto3"; package tensorflow; import "tensorflow/core/framework/tensor_shape.proto"; import "tensorflow/core/framework/types.proto"; option cc_enable_arenas = true; option java_outer_classname = "ResourceHandle"; option java_multiple_files = true; option java_package = "org.tensorflow.framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/resource_handle_go_proto"; // Protocol buffer representing a handle to a tensorflow resource. Handles are // not valid across executions, but can be serialized back and forth from within // a single run. message ResourceHandleProto { // Unique name for the device containing the resource. string device = 1; // Container in which this resource is placed. string container = 2; // Unique name of this resource. string name = 3; // Hash code for the type of the resource. Is only valid in the same device // and in the same execution. uint64 hash_code = 4; // For debug-only, the name of the type pointed to by this handle, if // available. string maybe_type_name = 5; // Protocol buffer representing a pair of (data type, tensor shape). message DtypeAndShape { DataType dtype = 1; TensorShapeProto shape = 2; } // Data types and shapes for the underlying resource. repeated DtypeAndShape dtypes_and_shapes = 6; reserved 7; }
codelabs/tfserving-flutter/codelab2/finished/lib/proto/tensorflow/core/framework/resource_handle.proto/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/finished/lib/proto/tensorflow/core/framework/resource_handle.proto", "repo_id": "codelabs", "token_count": 403 }
187
syntax = "proto3"; package tensorflow.serving; option cc_enable_arenas = true; import "tensorflow/core/framework/tensor.proto"; import "tensorflow_serving/apis/model.proto"; // PredictRequest specifies which TensorFlow model to run, as well as // how inputs are mapped to tensors and how outputs are filtered before // returning to user. message PredictRequest { // Model Specification. If version is not specified, will use the latest // (numerical) version. ModelSpec model_spec = 1; // Input tensors. // Names of input tensor are alias names. The mapping from aliases to real // input tensor names is stored in the SavedModel export as a prediction // SignatureDef under the 'inputs' field. map<string, TensorProto> inputs = 2; // Output filter. // Names specified are alias names. The mapping from aliases to real output // tensor names is stored in the SavedModel export as a prediction // SignatureDef under the 'outputs' field. // Only tensors specified here will be run/fetched and returned, with the // exception that when none is specified, all tensors specified in the // named signature will be run/fetched and returned. repeated string output_filter = 3; } // Response for PredictRequest on successful run. message PredictResponse { // Effective Model Specification used to process PredictRequest. ModelSpec model_spec = 2; // Output tensors. map<string, TensorProto> outputs = 1; }
codelabs/tfserving-flutter/codelab2/finished/lib/proto/tensorflow_serving/apis/predict.proto/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/finished/lib/proto/tensorflow_serving/apis/predict.proto", "repo_id": "codelabs", "token_count": 389 }
188
#include "../../Flutter/Flutter-Debug.xcconfig" #include "Warnings.xcconfig"
codelabs/tfserving-flutter/codelab2/finished/macos/Runner/Configs/Debug.xcconfig/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/finished/macos/Runner/Configs/Debug.xcconfig", "repo_id": "codelabs", "token_count": 32 }
189
/// // Generated code. Do not modify. // source: google/protobuf/wrappers.proto // // @dart = 2.12 // ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields import 'dart:core' as $core; import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin; class DoubleValue extends $pb.GeneratedMessage with $mixin.DoubleValueMixin { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'DoubleValue', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.DoubleValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.DoubleValueMixin.fromProto3JsonHelper) ..a<$core.double>( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'value', $pb.PbFieldType.OD) ..hasRequiredFields = false; DoubleValue._() : super(); factory DoubleValue({ $core.double? value, }) { final _result = create(); if (value != null) { _result.value = value; } return _result; } factory DoubleValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory DoubleValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') DoubleValue clone() => DoubleValue()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') DoubleValue copyWith(void Function(DoubleValue) updates) => super.copyWith((message) => updates(message as DoubleValue)) as DoubleValue; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static DoubleValue create() => DoubleValue._(); DoubleValue createEmptyInstance() => create(); static $pb.PbList<DoubleValue> createRepeated() => $pb.PbList<DoubleValue>(); @$core.pragma('dart2js:noInline') static DoubleValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<DoubleValue>(create); static DoubleValue? _defaultInstance; @$pb.TagNumber(1) $core.double get value => $_getN(0); @$pb.TagNumber(1) set value($core.double v) { $_setDouble(0, v); } @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) void clearValue() => clearField(1); } class FloatValue extends $pb.GeneratedMessage with $mixin.FloatValueMixin { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'FloatValue', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.FloatValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.FloatValueMixin.fromProto3JsonHelper) ..a<$core.double>( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'value', $pb.PbFieldType.OF) ..hasRequiredFields = false; FloatValue._() : super(); factory FloatValue({ $core.double? value, }) { final _result = create(); if (value != null) { _result.value = value; } return _result; } factory FloatValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory FloatValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') FloatValue clone() => FloatValue()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') FloatValue copyWith(void Function(FloatValue) updates) => super.copyWith((message) => updates(message as FloatValue)) as FloatValue; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static FloatValue create() => FloatValue._(); FloatValue createEmptyInstance() => create(); static $pb.PbList<FloatValue> createRepeated() => $pb.PbList<FloatValue>(); @$core.pragma('dart2js:noInline') static FloatValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<FloatValue>(create); static FloatValue? _defaultInstance; @$pb.TagNumber(1) $core.double get value => $_getN(0); @$pb.TagNumber(1) set value($core.double v) { $_setFloat(0, v); } @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) void clearValue() => clearField(1); } class Int64Value extends $pb.GeneratedMessage with $mixin.Int64ValueMixin { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Int64Value', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.Int64ValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.Int64ValueMixin.fromProto3JsonHelper) ..aInt64( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'value') ..hasRequiredFields = false; Int64Value._() : super(); factory Int64Value({ $fixnum.Int64? value, }) { final _result = create(); if (value != null) { _result.value = value; } return _result; } factory Int64Value.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Int64Value.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') Int64Value clone() => Int64Value()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Int64Value copyWith(void Function(Int64Value) updates) => super.copyWith((message) => updates(message as Int64Value)) as Int64Value; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static Int64Value create() => Int64Value._(); Int64Value createEmptyInstance() => create(); static $pb.PbList<Int64Value> createRepeated() => $pb.PbList<Int64Value>(); @$core.pragma('dart2js:noInline') static Int64Value getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Int64Value>(create); static Int64Value? _defaultInstance; @$pb.TagNumber(1) $fixnum.Int64 get value => $_getI64(0); @$pb.TagNumber(1) set value($fixnum.Int64 v) { $_setInt64(0, v); } @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) void clearValue() => clearField(1); } class UInt64Value extends $pb.GeneratedMessage with $mixin.UInt64ValueMixin { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UInt64Value', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.UInt64ValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.UInt64ValueMixin.fromProto3JsonHelper) ..a<$fixnum.Int64>( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'value', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) ..hasRequiredFields = false; UInt64Value._() : super(); factory UInt64Value({ $fixnum.Int64? value, }) { final _result = create(); if (value != null) { _result.value = value; } return _result; } factory UInt64Value.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory UInt64Value.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') UInt64Value clone() => UInt64Value()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') UInt64Value copyWith(void Function(UInt64Value) updates) => super.copyWith((message) => updates(message as UInt64Value)) as UInt64Value; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static UInt64Value create() => UInt64Value._(); UInt64Value createEmptyInstance() => create(); static $pb.PbList<UInt64Value> createRepeated() => $pb.PbList<UInt64Value>(); @$core.pragma('dart2js:noInline') static UInt64Value getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UInt64Value>(create); static UInt64Value? _defaultInstance; @$pb.TagNumber(1) $fixnum.Int64 get value => $_getI64(0); @$pb.TagNumber(1) set value($fixnum.Int64 v) { $_setInt64(0, v); } @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) void clearValue() => clearField(1); } class Int32Value extends $pb.GeneratedMessage with $mixin.Int32ValueMixin { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Int32Value', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.Int32ValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.Int32ValueMixin.fromProto3JsonHelper) ..a<$core.int>( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'value', $pb.PbFieldType.O3) ..hasRequiredFields = false; Int32Value._() : super(); factory Int32Value({ $core.int? value, }) { final _result = create(); if (value != null) { _result.value = value; } return _result; } factory Int32Value.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Int32Value.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') Int32Value clone() => Int32Value()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Int32Value copyWith(void Function(Int32Value) updates) => super.copyWith((message) => updates(message as Int32Value)) as Int32Value; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static Int32Value create() => Int32Value._(); Int32Value createEmptyInstance() => create(); static $pb.PbList<Int32Value> createRepeated() => $pb.PbList<Int32Value>(); @$core.pragma('dart2js:noInline') static Int32Value getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Int32Value>(create); static Int32Value? _defaultInstance; @$pb.TagNumber(1) $core.int get value => $_getIZ(0); @$pb.TagNumber(1) set value($core.int v) { $_setSignedInt32(0, v); } @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) void clearValue() => clearField(1); } class UInt32Value extends $pb.GeneratedMessage with $mixin.UInt32ValueMixin { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UInt32Value', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.UInt32ValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.UInt32ValueMixin.fromProto3JsonHelper) ..a<$core.int>( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'value', $pb.PbFieldType.OU3) ..hasRequiredFields = false; UInt32Value._() : super(); factory UInt32Value({ $core.int? value, }) { final _result = create(); if (value != null) { _result.value = value; } return _result; } factory UInt32Value.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory UInt32Value.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') UInt32Value clone() => UInt32Value()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') UInt32Value copyWith(void Function(UInt32Value) updates) => super.copyWith((message) => updates(message as UInt32Value)) as UInt32Value; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static UInt32Value create() => UInt32Value._(); UInt32Value createEmptyInstance() => create(); static $pb.PbList<UInt32Value> createRepeated() => $pb.PbList<UInt32Value>(); @$core.pragma('dart2js:noInline') static UInt32Value getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UInt32Value>(create); static UInt32Value? _defaultInstance; @$pb.TagNumber(1) $core.int get value => $_getIZ(0); @$pb.TagNumber(1) set value($core.int v) { $_setUnsignedInt32(0, v); } @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) void clearValue() => clearField(1); } class BoolValue extends $pb.GeneratedMessage with $mixin.BoolValueMixin { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'BoolValue', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.BoolValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.BoolValueMixin.fromProto3JsonHelper) ..aOB( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'value') ..hasRequiredFields = false; BoolValue._() : super(); factory BoolValue({ $core.bool? value, }) { final _result = create(); if (value != null) { _result.value = value; } return _result; } factory BoolValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory BoolValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') BoolValue clone() => BoolValue()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') BoolValue copyWith(void Function(BoolValue) updates) => super.copyWith((message) => updates(message as BoolValue)) as BoolValue; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static BoolValue create() => BoolValue._(); BoolValue createEmptyInstance() => create(); static $pb.PbList<BoolValue> createRepeated() => $pb.PbList<BoolValue>(); @$core.pragma('dart2js:noInline') static BoolValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<BoolValue>(create); static BoolValue? _defaultInstance; @$pb.TagNumber(1) $core.bool get value => $_getBF(0); @$pb.TagNumber(1) set value($core.bool v) { $_setBool(0, v); } @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) void clearValue() => clearField(1); } class StringValue extends $pb.GeneratedMessage with $mixin.StringValueMixin { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'StringValue', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.StringValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.StringValueMixin.fromProto3JsonHelper) ..aOS( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'value') ..hasRequiredFields = false; StringValue._() : super(); factory StringValue({ $core.String? value, }) { final _result = create(); if (value != null) { _result.value = value; } return _result; } factory StringValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory StringValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') StringValue clone() => StringValue()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') StringValue copyWith(void Function(StringValue) updates) => super.copyWith((message) => updates(message as StringValue)) as StringValue; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static StringValue create() => StringValue._(); StringValue createEmptyInstance() => create(); static $pb.PbList<StringValue> createRepeated() => $pb.PbList<StringValue>(); @$core.pragma('dart2js:noInline') static StringValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<StringValue>(create); static StringValue? _defaultInstance; @$pb.TagNumber(1) $core.String get value => $_getSZ(0); @$pb.TagNumber(1) set value($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) void clearValue() => clearField(1); } class BytesValue extends $pb.GeneratedMessage with $mixin.BytesValueMixin { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'BytesValue', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.BytesValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.BytesValueMixin.fromProto3JsonHelper) ..a<$core.List<$core.int>>( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'value', $pb.PbFieldType.OY) ..hasRequiredFields = false; BytesValue._() : super(); factory BytesValue({ $core.List<$core.int>? value, }) { final _result = create(); if (value != null) { _result.value = value; } return _result; } factory BytesValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory BytesValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') BytesValue clone() => BytesValue()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') BytesValue copyWith(void Function(BytesValue) updates) => super.copyWith((message) => updates(message as BytesValue)) as BytesValue; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static BytesValue create() => BytesValue._(); BytesValue createEmptyInstance() => create(); static $pb.PbList<BytesValue> createRepeated() => $pb.PbList<BytesValue>(); @$core.pragma('dart2js:noInline') static BytesValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<BytesValue>(create); static BytesValue? _defaultInstance; @$pb.TagNumber(1) $core.List<$core.int> get value => $_getN(0); @$pb.TagNumber(1) set value($core.List<$core.int> v) { $_setBytes(0, v); } @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) void clearValue() => clearField(1); }
codelabs/tfserving-flutter/codelab2/starter/lib/proto/generated/google/protobuf/wrappers.pb.dart/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/starter/lib/proto/generated/google/protobuf/wrappers.pb.dart", "repo_id": "codelabs", "token_count": 9645 }
190
/// // Generated code. Do not modify. // source: tensorflow/core/framework/function.proto // // @dart = 2.12 // ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields
codelabs/tfserving-flutter/codelab2/starter/lib/proto/generated/tensorflow/core/framework/function.pbenum.dart/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/starter/lib/proto/generated/tensorflow/core/framework/function.pbenum.dart", "repo_id": "codelabs", "token_count": 115 }
191
/// // Generated code. Do not modify. // source: tensorflow/core/framework/tensor.proto // // @dart = 2.12 // ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package import 'dart:core' as $core; import 'dart:convert' as $convert; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use tensorProtoDescriptor instead') const TensorProto$json = const { '1': 'TensorProto', '2': const [ const { '1': 'dtype', '3': 1, '4': 1, '5': 14, '6': '.tensorflow.DataType', '10': 'dtype' }, const { '1': 'tensor_shape', '3': 2, '4': 1, '5': 11, '6': '.tensorflow.TensorShapeProto', '10': 'tensorShape' }, const { '1': 'version_number', '3': 3, '4': 1, '5': 5, '10': 'versionNumber' }, const { '1': 'tensor_content', '3': 4, '4': 1, '5': 12, '10': 'tensorContent' }, const { '1': 'half_val', '3': 13, '4': 3, '5': 5, '8': const {'2': true}, '10': 'halfVal', }, const { '1': 'float_val', '3': 5, '4': 3, '5': 2, '8': const {'2': true}, '10': 'floatVal', }, const { '1': 'double_val', '3': 6, '4': 3, '5': 1, '8': const {'2': true}, '10': 'doubleVal', }, const { '1': 'int_val', '3': 7, '4': 3, '5': 5, '8': const {'2': true}, '10': 'intVal', }, const {'1': 'string_val', '3': 8, '4': 3, '5': 12, '10': 'stringVal'}, const { '1': 'scomplex_val', '3': 9, '4': 3, '5': 2, '8': const {'2': true}, '10': 'scomplexVal', }, const { '1': 'int64_val', '3': 10, '4': 3, '5': 3, '8': const {'2': true}, '10': 'int64Val', }, const { '1': 'bool_val', '3': 11, '4': 3, '5': 8, '8': const {'2': true}, '10': 'boolVal', }, const { '1': 'dcomplex_val', '3': 12, '4': 3, '5': 1, '8': const {'2': true}, '10': 'dcomplexVal', }, const { '1': 'resource_handle_val', '3': 14, '4': 3, '5': 11, '6': '.tensorflow.ResourceHandleProto', '10': 'resourceHandleVal' }, const { '1': 'variant_val', '3': 15, '4': 3, '5': 11, '6': '.tensorflow.VariantTensorDataProto', '10': 'variantVal' }, const { '1': 'uint32_val', '3': 16, '4': 3, '5': 13, '8': const {'2': true}, '10': 'uint32Val', }, const { '1': 'uint64_val', '3': 17, '4': 3, '5': 4, '8': const {'2': true}, '10': 'uint64Val', }, ], }; /// Descriptor for `TensorProto`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List tensorProtoDescriptor = $convert.base64Decode( 'CgtUZW5zb3JQcm90bxIqCgVkdHlwZRgBIAEoDjIULnRlbnNvcmZsb3cuRGF0YVR5cGVSBWR0eXBlEj8KDHRlbnNvcl9zaGFwZRgCIAEoCzIcLnRlbnNvcmZsb3cuVGVuc29yU2hhcGVQcm90b1ILdGVuc29yU2hhcGUSJQoOdmVyc2lvbl9udW1iZXIYAyABKAVSDXZlcnNpb25OdW1iZXISJQoOdGVuc29yX2NvbnRlbnQYBCABKAxSDXRlbnNvckNvbnRlbnQSHQoIaGFsZl92YWwYDSADKAVCAhABUgdoYWxmVmFsEh8KCWZsb2F0X3ZhbBgFIAMoAkICEAFSCGZsb2F0VmFsEiEKCmRvdWJsZV92YWwYBiADKAFCAhABUglkb3VibGVWYWwSGwoHaW50X3ZhbBgHIAMoBUICEAFSBmludFZhbBIdCgpzdHJpbmdfdmFsGAggAygMUglzdHJpbmdWYWwSJQoMc2NvbXBsZXhfdmFsGAkgAygCQgIQAVILc2NvbXBsZXhWYWwSHwoJaW50NjRfdmFsGAogAygDQgIQAVIIaW50NjRWYWwSHQoIYm9vbF92YWwYCyADKAhCAhABUgdib29sVmFsEiUKDGRjb21wbGV4X3ZhbBgMIAMoAUICEAFSC2Rjb21wbGV4VmFsEk8KE3Jlc291cmNlX2hhbmRsZV92YWwYDiADKAsyHy50ZW5zb3JmbG93LlJlc291cmNlSGFuZGxlUHJvdG9SEXJlc291cmNlSGFuZGxlVmFsEkMKC3ZhcmlhbnRfdmFsGA8gAygLMiIudGVuc29yZmxvdy5WYXJpYW50VGVuc29yRGF0YVByb3RvUgp2YXJpYW50VmFsEiEKCnVpbnQzMl92YWwYECADKA1CAhABUgl1aW50MzJWYWwSIQoKdWludDY0X3ZhbBgRIAMoBEICEAFSCXVpbnQ2NFZhbA=='); @$core.Deprecated('Use variantTensorDataProtoDescriptor instead') const VariantTensorDataProto$json = const { '1': 'VariantTensorDataProto', '2': const [ const {'1': 'type_name', '3': 1, '4': 1, '5': 9, '10': 'typeName'}, const {'1': 'metadata', '3': 2, '4': 1, '5': 12, '10': 'metadata'}, const { '1': 'tensors', '3': 3, '4': 3, '5': 11, '6': '.tensorflow.TensorProto', '10': 'tensors' }, ], }; /// Descriptor for `VariantTensorDataProto`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List variantTensorDataProtoDescriptor = $convert.base64Decode( 'ChZWYXJpYW50VGVuc29yRGF0YVByb3RvEhsKCXR5cGVfbmFtZRgBIAEoCVIIdHlwZU5hbWUSGgoIbWV0YWRhdGEYAiABKAxSCG1ldGFkYXRhEjEKB3RlbnNvcnMYAyADKAsyFy50ZW5zb3JmbG93LlRlbnNvclByb3RvUgd0ZW5zb3Jz');
codelabs/tfserving-flutter/codelab2/starter/lib/proto/generated/tensorflow/core/framework/tensor.pbjson.dart/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/starter/lib/proto/generated/tensorflow/core/framework/tensor.pbjson.dart", "repo_id": "codelabs", "token_count": 2858 }
192
/// // Generated code. Do not modify. // source: tensorflow/core/protobuf/saved_object_graph.proto // // @dart = 2.12 // ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields import 'dart:core' as $core; import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; import 'trackable_object_graph.pb.dart' as $0; import '../../../google/protobuf/any.pb.dart' as $1; import '../framework/versions.pb.dart' as $2; import 'struct.pb.dart' as $3; import '../framework/tensor_shape.pb.dart' as $4; import '../framework/types.pbenum.dart' as $5; import '../framework/variable.pbenum.dart' as $6; import 'saved_object_graph.pbenum.dart'; export 'saved_object_graph.pbenum.dart'; class SavedObjectGraph extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SavedObjectGraph', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow'), createEmptyInstance: create) ..pc<SavedObject>( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'nodes', $pb.PbFieldType.PM, subBuilder: SavedObject.create) ..m<$core.String, SavedConcreteFunction>( 2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'concreteFunctions', entryClassName: 'SavedObjectGraph.ConcreteFunctionsEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: SavedConcreteFunction.create, packageName: const $pb.PackageName('tensorflow')) ..hasRequiredFields = false; SavedObjectGraph._() : super(); factory SavedObjectGraph({ $core.Iterable<SavedObject>? nodes, $core.Map<$core.String, SavedConcreteFunction>? concreteFunctions, }) { final _result = create(); if (nodes != null) { _result.nodes.addAll(nodes); } if (concreteFunctions != null) { _result.concreteFunctions.addAll(concreteFunctions); } return _result; } factory SavedObjectGraph.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory SavedObjectGraph.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') SavedObjectGraph clone() => SavedObjectGraph()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') SavedObjectGraph copyWith(void Function(SavedObjectGraph) updates) => super.copyWith((message) => updates(message as SavedObjectGraph)) as SavedObjectGraph; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SavedObjectGraph create() => SavedObjectGraph._(); SavedObjectGraph createEmptyInstance() => create(); static $pb.PbList<SavedObjectGraph> createRepeated() => $pb.PbList<SavedObjectGraph>(); @$core.pragma('dart2js:noInline') static SavedObjectGraph getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SavedObjectGraph>(create); static SavedObjectGraph? _defaultInstance; @$pb.TagNumber(1) $core.List<SavedObject> get nodes => $_getList(0); @$pb.TagNumber(2) $core.Map<$core.String, SavedConcreteFunction> get concreteFunctions => $_getMap(1); } enum SavedObject_Kind { userObject, asset, function, variable, bareConcreteFunction, constant, resource, capturedTensor, notSet } class SavedObject extends $pb.GeneratedMessage { static const $core.Map<$core.int, SavedObject_Kind> _SavedObject_KindByTag = { 4: SavedObject_Kind.userObject, 5: SavedObject_Kind.asset, 6: SavedObject_Kind.function, 7: SavedObject_Kind.variable, 8: SavedObject_Kind.bareConcreteFunction, 9: SavedObject_Kind.constant, 10: SavedObject_Kind.resource, 12: SavedObject_Kind.capturedTensor, 0: SavedObject_Kind.notSet }; static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SavedObject', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow'), createEmptyInstance: create) ..oo(0, [4, 5, 6, 7, 8, 9, 10, 12]) ..pc<$0.TrackableObjectGraph_TrackableObject_ObjectReference>( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $0.TrackableObjectGraph_TrackableObject_ObjectReference.create) ..pc<$0.TrackableObjectGraph_TrackableObject_SlotVariableReference>( 3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'slotVariables', $pb.PbFieldType.PM, subBuilder: $0 .TrackableObjectGraph_TrackableObject_SlotVariableReference.create) ..aOM<SavedUserObject>( 4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'userObject', subBuilder: SavedUserObject.create) ..aOM<SavedAsset>( 5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'asset', subBuilder: SavedAsset.create) ..aOM<SavedFunction>( 6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'function', subBuilder: SavedFunction.create) ..aOM<SavedVariable>( 7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'variable', subBuilder: SavedVariable.create) ..aOM<SavedBareConcreteFunction>( 8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'bareConcreteFunction', subBuilder: SavedBareConcreteFunction.create) ..aOM<SavedConstant>( 9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'constant', subBuilder: SavedConstant.create) ..aOM<SavedResource>( 10, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'resource', subBuilder: SavedResource.create) ..m<$core.String, SaveableObject>( 11, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'saveableObjects', entryClassName: 'SavedObject.SaveableObjectsEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: SaveableObject.create, packageName: const $pb.PackageName('tensorflow')) ..aOM<CapturedTensor>( 12, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'capturedTensor', subBuilder: CapturedTensor.create) ..aOS( 13, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'registeredName') ..aOM<$1.Any>( 14, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'serializedUserProto', subBuilder: $1.Any.create) ..pc<$0.TrackableObjectGraph_TrackableObject_ObjectReference>( 15, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'dependencies', $pb.PbFieldType.PM, subBuilder: $0.TrackableObjectGraph_TrackableObject_ObjectReference.create) ..aOS( 16, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'registeredSaver') ..hasRequiredFields = false; SavedObject._() : super(); factory SavedObject({ $core.Iterable<$0.TrackableObjectGraph_TrackableObject_ObjectReference>? children, $core.Iterable< $0.TrackableObjectGraph_TrackableObject_SlotVariableReference>? slotVariables, SavedUserObject? userObject, SavedAsset? asset, SavedFunction? function, SavedVariable? variable, SavedBareConcreteFunction? bareConcreteFunction, SavedConstant? constant, SavedResource? resource, $core.Map<$core.String, SaveableObject>? saveableObjects, CapturedTensor? capturedTensor, $core.String? registeredName, $1.Any? serializedUserProto, $core.Iterable<$0.TrackableObjectGraph_TrackableObject_ObjectReference>? dependencies, $core.String? registeredSaver, }) { final _result = create(); if (children != null) { _result.children.addAll(children); } if (slotVariables != null) { _result.slotVariables.addAll(slotVariables); } if (userObject != null) { _result.userObject = userObject; } if (asset != null) { _result.asset = asset; } if (function != null) { _result.function = function; } if (variable != null) { _result.variable = variable; } if (bareConcreteFunction != null) { _result.bareConcreteFunction = bareConcreteFunction; } if (constant != null) { _result.constant = constant; } if (resource != null) { _result.resource = resource; } if (saveableObjects != null) { _result.saveableObjects.addAll(saveableObjects); } if (capturedTensor != null) { _result.capturedTensor = capturedTensor; } if (registeredName != null) { _result.registeredName = registeredName; } if (serializedUserProto != null) { _result.serializedUserProto = serializedUserProto; } if (dependencies != null) { _result.dependencies.addAll(dependencies); } if (registeredSaver != null) { _result.registeredSaver = registeredSaver; } return _result; } factory SavedObject.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory SavedObject.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') SavedObject clone() => SavedObject()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') SavedObject copyWith(void Function(SavedObject) updates) => super.copyWith((message) => updates(message as SavedObject)) as SavedObject; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SavedObject create() => SavedObject._(); SavedObject createEmptyInstance() => create(); static $pb.PbList<SavedObject> createRepeated() => $pb.PbList<SavedObject>(); @$core.pragma('dart2js:noInline') static SavedObject getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SavedObject>(create); static SavedObject? _defaultInstance; SavedObject_Kind whichKind() => _SavedObject_KindByTag[$_whichOneof(0)]!; void clearKind() => clearField($_whichOneof(0)); @$pb.TagNumber(1) $core.List<$0.TrackableObjectGraph_TrackableObject_ObjectReference> get children => $_getList(0); @$pb.TagNumber(3) $core.List<$0.TrackableObjectGraph_TrackableObject_SlotVariableReference> get slotVariables => $_getList(1); @$pb.TagNumber(4) SavedUserObject get userObject => $_getN(2); @$pb.TagNumber(4) set userObject(SavedUserObject v) { setField(4, v); } @$pb.TagNumber(4) $core.bool hasUserObject() => $_has(2); @$pb.TagNumber(4) void clearUserObject() => clearField(4); @$pb.TagNumber(4) SavedUserObject ensureUserObject() => $_ensure(2); @$pb.TagNumber(5) SavedAsset get asset => $_getN(3); @$pb.TagNumber(5) set asset(SavedAsset v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasAsset() => $_has(3); @$pb.TagNumber(5) void clearAsset() => clearField(5); @$pb.TagNumber(5) SavedAsset ensureAsset() => $_ensure(3); @$pb.TagNumber(6) SavedFunction get function => $_getN(4); @$pb.TagNumber(6) set function(SavedFunction v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasFunction() => $_has(4); @$pb.TagNumber(6) void clearFunction() => clearField(6); @$pb.TagNumber(6) SavedFunction ensureFunction() => $_ensure(4); @$pb.TagNumber(7) SavedVariable get variable => $_getN(5); @$pb.TagNumber(7) set variable(SavedVariable v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasVariable() => $_has(5); @$pb.TagNumber(7) void clearVariable() => clearField(7); @$pb.TagNumber(7) SavedVariable ensureVariable() => $_ensure(5); @$pb.TagNumber(8) SavedBareConcreteFunction get bareConcreteFunction => $_getN(6); @$pb.TagNumber(8) set bareConcreteFunction(SavedBareConcreteFunction v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasBareConcreteFunction() => $_has(6); @$pb.TagNumber(8) void clearBareConcreteFunction() => clearField(8); @$pb.TagNumber(8) SavedBareConcreteFunction ensureBareConcreteFunction() => $_ensure(6); @$pb.TagNumber(9) SavedConstant get constant => $_getN(7); @$pb.TagNumber(9) set constant(SavedConstant v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasConstant() => $_has(7); @$pb.TagNumber(9) void clearConstant() => clearField(9); @$pb.TagNumber(9) SavedConstant ensureConstant() => $_ensure(7); @$pb.TagNumber(10) SavedResource get resource => $_getN(8); @$pb.TagNumber(10) set resource(SavedResource v) { setField(10, v); } @$pb.TagNumber(10) $core.bool hasResource() => $_has(8); @$pb.TagNumber(10) void clearResource() => clearField(10); @$pb.TagNumber(10) SavedResource ensureResource() => $_ensure(8); @$pb.TagNumber(11) $core.Map<$core.String, SaveableObject> get saveableObjects => $_getMap(9); @$pb.TagNumber(12) CapturedTensor get capturedTensor => $_getN(10); @$pb.TagNumber(12) set capturedTensor(CapturedTensor v) { setField(12, v); } @$pb.TagNumber(12) $core.bool hasCapturedTensor() => $_has(10); @$pb.TagNumber(12) void clearCapturedTensor() => clearField(12); @$pb.TagNumber(12) CapturedTensor ensureCapturedTensor() => $_ensure(10); @$pb.TagNumber(13) $core.String get registeredName => $_getSZ(11); @$pb.TagNumber(13) set registeredName($core.String v) { $_setString(11, v); } @$pb.TagNumber(13) $core.bool hasRegisteredName() => $_has(11); @$pb.TagNumber(13) void clearRegisteredName() => clearField(13); @$pb.TagNumber(14) $1.Any get serializedUserProto => $_getN(12); @$pb.TagNumber(14) set serializedUserProto($1.Any v) { setField(14, v); } @$pb.TagNumber(14) $core.bool hasSerializedUserProto() => $_has(12); @$pb.TagNumber(14) void clearSerializedUserProto() => clearField(14); @$pb.TagNumber(14) $1.Any ensureSerializedUserProto() => $_ensure(12); @$pb.TagNumber(15) $core.List<$0.TrackableObjectGraph_TrackableObject_ObjectReference> get dependencies => $_getList(13); @$pb.TagNumber(16) $core.String get registeredSaver => $_getSZ(14); @$pb.TagNumber(16) set registeredSaver($core.String v) { $_setString(14, v); } @$pb.TagNumber(16) $core.bool hasRegisteredSaver() => $_has(14); @$pb.TagNumber(16) void clearRegisteredSaver() => clearField(16); } class SavedUserObject extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SavedUserObject', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow'), createEmptyInstance: create) ..aOS( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'identifier') ..aOM<$2.VersionDef>( 2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'version', subBuilder: $2.VersionDef.create) ..aOS( 3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'metadata') ..hasRequiredFields = false; SavedUserObject._() : super(); factory SavedUserObject({ $core.String? identifier, $2.VersionDef? version, @$core.Deprecated('This field is deprecated.') $core.String? metadata, }) { final _result = create(); if (identifier != null) { _result.identifier = identifier; } if (version != null) { _result.version = version; } if (metadata != null) { // ignore: deprecated_member_use_from_same_package _result.metadata = metadata; } return _result; } factory SavedUserObject.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory SavedUserObject.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') SavedUserObject clone() => SavedUserObject()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') SavedUserObject copyWith(void Function(SavedUserObject) updates) => super.copyWith((message) => updates(message as SavedUserObject)) as SavedUserObject; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SavedUserObject create() => SavedUserObject._(); SavedUserObject createEmptyInstance() => create(); static $pb.PbList<SavedUserObject> createRepeated() => $pb.PbList<SavedUserObject>(); @$core.pragma('dart2js:noInline') static SavedUserObject getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SavedUserObject>(create); static SavedUserObject? _defaultInstance; @$pb.TagNumber(1) $core.String get identifier => $_getSZ(0); @$pb.TagNumber(1) set identifier($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasIdentifier() => $_has(0); @$pb.TagNumber(1) void clearIdentifier() => clearField(1); @$pb.TagNumber(2) $2.VersionDef get version => $_getN(1); @$pb.TagNumber(2) set version($2.VersionDef v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasVersion() => $_has(1); @$pb.TagNumber(2) void clearVersion() => clearField(2); @$pb.TagNumber(2) $2.VersionDef ensureVersion() => $_ensure(1); @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(3) $core.String get metadata => $_getSZ(2); @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(3) set metadata($core.String v) { $_setString(2, v); } @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(3) $core.bool hasMetadata() => $_has(2); @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(3) void clearMetadata() => clearField(3); } class SavedAsset extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SavedAsset', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow'), createEmptyInstance: create) ..a<$core.int>( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'assetFileDefIndex', $pb.PbFieldType.O3) ..hasRequiredFields = false; SavedAsset._() : super(); factory SavedAsset({ $core.int? assetFileDefIndex, }) { final _result = create(); if (assetFileDefIndex != null) { _result.assetFileDefIndex = assetFileDefIndex; } return _result; } factory SavedAsset.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory SavedAsset.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') SavedAsset clone() => SavedAsset()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') SavedAsset copyWith(void Function(SavedAsset) updates) => super.copyWith((message) => updates(message as SavedAsset)) as SavedAsset; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SavedAsset create() => SavedAsset._(); SavedAsset createEmptyInstance() => create(); static $pb.PbList<SavedAsset> createRepeated() => $pb.PbList<SavedAsset>(); @$core.pragma('dart2js:noInline') static SavedAsset getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SavedAsset>(create); static SavedAsset? _defaultInstance; @$pb.TagNumber(1) $core.int get assetFileDefIndex => $_getIZ(0); @$pb.TagNumber(1) set assetFileDefIndex($core.int v) { $_setSignedInt32(0, v); } @$pb.TagNumber(1) $core.bool hasAssetFileDefIndex() => $_has(0); @$pb.TagNumber(1) void clearAssetFileDefIndex() => clearField(1); } class SavedFunction extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SavedFunction', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow'), createEmptyInstance: create) ..pPS( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'concreteFunctions') ..aOM<FunctionSpec>( 2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'functionSpec', subBuilder: FunctionSpec.create) ..hasRequiredFields = false; SavedFunction._() : super(); factory SavedFunction({ $core.Iterable<$core.String>? concreteFunctions, FunctionSpec? functionSpec, }) { final _result = create(); if (concreteFunctions != null) { _result.concreteFunctions.addAll(concreteFunctions); } if (functionSpec != null) { _result.functionSpec = functionSpec; } return _result; } factory SavedFunction.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory SavedFunction.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') SavedFunction clone() => SavedFunction()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') SavedFunction copyWith(void Function(SavedFunction) updates) => super.copyWith((message) => updates(message as SavedFunction)) as SavedFunction; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SavedFunction create() => SavedFunction._(); SavedFunction createEmptyInstance() => create(); static $pb.PbList<SavedFunction> createRepeated() => $pb.PbList<SavedFunction>(); @$core.pragma('dart2js:noInline') static SavedFunction getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SavedFunction>(create); static SavedFunction? _defaultInstance; @$pb.TagNumber(1) $core.List<$core.String> get concreteFunctions => $_getList(0); @$pb.TagNumber(2) FunctionSpec get functionSpec => $_getN(1); @$pb.TagNumber(2) set functionSpec(FunctionSpec v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasFunctionSpec() => $_has(1); @$pb.TagNumber(2) void clearFunctionSpec() => clearField(2); @$pb.TagNumber(2) FunctionSpec ensureFunctionSpec() => $_ensure(1); } class CapturedTensor extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CapturedTensor', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow'), createEmptyInstance: create) ..aOS( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') ..aOS( 2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'concreteFunction') ..hasRequiredFields = false; CapturedTensor._() : super(); factory CapturedTensor({ $core.String? name, $core.String? concreteFunction, }) { final _result = create(); if (name != null) { _result.name = name; } if (concreteFunction != null) { _result.concreteFunction = concreteFunction; } return _result; } factory CapturedTensor.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory CapturedTensor.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') CapturedTensor clone() => CapturedTensor()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') CapturedTensor copyWith(void Function(CapturedTensor) updates) => super.copyWith((message) => updates(message as CapturedTensor)) as CapturedTensor; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static CapturedTensor create() => CapturedTensor._(); CapturedTensor createEmptyInstance() => create(); static $pb.PbList<CapturedTensor> createRepeated() => $pb.PbList<CapturedTensor>(); @$core.pragma('dart2js:noInline') static CapturedTensor getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<CapturedTensor>(create); static CapturedTensor? _defaultInstance; @$pb.TagNumber(1) $core.String get name => $_getSZ(0); @$pb.TagNumber(1) set name($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasName() => $_has(0); @$pb.TagNumber(1) void clearName() => clearField(1); @$pb.TagNumber(2) $core.String get concreteFunction => $_getSZ(1); @$pb.TagNumber(2) set concreteFunction($core.String v) { $_setString(1, v); } @$pb.TagNumber(2) $core.bool hasConcreteFunction() => $_has(1); @$pb.TagNumber(2) void clearConcreteFunction() => clearField(2); } class SavedConcreteFunction extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SavedConcreteFunction', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow'), createEmptyInstance: create) ..p<$core.int>( 2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'boundInputs', $pb.PbFieldType.P3) ..aOM<$3.StructuredValue>( 3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'canonicalizedInputSignature', subBuilder: $3.StructuredValue.create) ..aOM<$3.StructuredValue>( 4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'outputSignature', subBuilder: $3.StructuredValue.create) ..hasRequiredFields = false; SavedConcreteFunction._() : super(); factory SavedConcreteFunction({ $core.Iterable<$core.int>? boundInputs, $3.StructuredValue? canonicalizedInputSignature, $3.StructuredValue? outputSignature, }) { final _result = create(); if (boundInputs != null) { _result.boundInputs.addAll(boundInputs); } if (canonicalizedInputSignature != null) { _result.canonicalizedInputSignature = canonicalizedInputSignature; } if (outputSignature != null) { _result.outputSignature = outputSignature; } return _result; } factory SavedConcreteFunction.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory SavedConcreteFunction.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') SavedConcreteFunction clone() => SavedConcreteFunction()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') SavedConcreteFunction copyWith( void Function(SavedConcreteFunction) updates) => super.copyWith((message) => updates(message as SavedConcreteFunction)) as SavedConcreteFunction; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SavedConcreteFunction create() => SavedConcreteFunction._(); SavedConcreteFunction createEmptyInstance() => create(); static $pb.PbList<SavedConcreteFunction> createRepeated() => $pb.PbList<SavedConcreteFunction>(); @$core.pragma('dart2js:noInline') static SavedConcreteFunction getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SavedConcreteFunction>(create); static SavedConcreteFunction? _defaultInstance; @$pb.TagNumber(2) $core.List<$core.int> get boundInputs => $_getList(0); @$pb.TagNumber(3) $3.StructuredValue get canonicalizedInputSignature => $_getN(1); @$pb.TagNumber(3) set canonicalizedInputSignature($3.StructuredValue v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasCanonicalizedInputSignature() => $_has(1); @$pb.TagNumber(3) void clearCanonicalizedInputSignature() => clearField(3); @$pb.TagNumber(3) $3.StructuredValue ensureCanonicalizedInputSignature() => $_ensure(1); @$pb.TagNumber(4) $3.StructuredValue get outputSignature => $_getN(2); @$pb.TagNumber(4) set outputSignature($3.StructuredValue v) { setField(4, v); } @$pb.TagNumber(4) $core.bool hasOutputSignature() => $_has(2); @$pb.TagNumber(4) void clearOutputSignature() => clearField(4); @$pb.TagNumber(4) $3.StructuredValue ensureOutputSignature() => $_ensure(2); } class SavedBareConcreteFunction extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SavedBareConcreteFunction', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow'), createEmptyInstance: create) ..aOS( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'concreteFunctionName') ..pPS( 2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'argumentKeywords') ..aInt64( 3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'allowedPositionalArguments') ..aOM<FunctionSpec>( 4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'functionSpec', subBuilder: FunctionSpec.create) ..hasRequiredFields = false; SavedBareConcreteFunction._() : super(); factory SavedBareConcreteFunction({ $core.String? concreteFunctionName, $core.Iterable<$core.String>? argumentKeywords, $fixnum.Int64? allowedPositionalArguments, FunctionSpec? functionSpec, }) { final _result = create(); if (concreteFunctionName != null) { _result.concreteFunctionName = concreteFunctionName; } if (argumentKeywords != null) { _result.argumentKeywords.addAll(argumentKeywords); } if (allowedPositionalArguments != null) { _result.allowedPositionalArguments = allowedPositionalArguments; } if (functionSpec != null) { _result.functionSpec = functionSpec; } return _result; } factory SavedBareConcreteFunction.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory SavedBareConcreteFunction.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') SavedBareConcreteFunction clone() => SavedBareConcreteFunction()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') SavedBareConcreteFunction copyWith( void Function(SavedBareConcreteFunction) updates) => super.copyWith((message) => updates(message as SavedBareConcreteFunction)) as SavedBareConcreteFunction; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SavedBareConcreteFunction create() => SavedBareConcreteFunction._(); SavedBareConcreteFunction createEmptyInstance() => create(); static $pb.PbList<SavedBareConcreteFunction> createRepeated() => $pb.PbList<SavedBareConcreteFunction>(); @$core.pragma('dart2js:noInline') static SavedBareConcreteFunction getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SavedBareConcreteFunction>(create); static SavedBareConcreteFunction? _defaultInstance; @$pb.TagNumber(1) $core.String get concreteFunctionName => $_getSZ(0); @$pb.TagNumber(1) set concreteFunctionName($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasConcreteFunctionName() => $_has(0); @$pb.TagNumber(1) void clearConcreteFunctionName() => clearField(1); @$pb.TagNumber(2) $core.List<$core.String> get argumentKeywords => $_getList(1); @$pb.TagNumber(3) $fixnum.Int64 get allowedPositionalArguments => $_getI64(2); @$pb.TagNumber(3) set allowedPositionalArguments($fixnum.Int64 v) { $_setInt64(2, v); } @$pb.TagNumber(3) $core.bool hasAllowedPositionalArguments() => $_has(2); @$pb.TagNumber(3) void clearAllowedPositionalArguments() => clearField(3); @$pb.TagNumber(4) FunctionSpec get functionSpec => $_getN(3); @$pb.TagNumber(4) set functionSpec(FunctionSpec v) { setField(4, v); } @$pb.TagNumber(4) $core.bool hasFunctionSpec() => $_has(3); @$pb.TagNumber(4) void clearFunctionSpec() => clearField(4); @$pb.TagNumber(4) FunctionSpec ensureFunctionSpec() => $_ensure(3); } class SavedConstant extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SavedConstant', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow'), createEmptyInstance: create) ..aOS( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'operation') ..hasRequiredFields = false; SavedConstant._() : super(); factory SavedConstant({ $core.String? operation, }) { final _result = create(); if (operation != null) { _result.operation = operation; } return _result; } factory SavedConstant.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory SavedConstant.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') SavedConstant clone() => SavedConstant()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') SavedConstant copyWith(void Function(SavedConstant) updates) => super.copyWith((message) => updates(message as SavedConstant)) as SavedConstant; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SavedConstant create() => SavedConstant._(); SavedConstant createEmptyInstance() => create(); static $pb.PbList<SavedConstant> createRepeated() => $pb.PbList<SavedConstant>(); @$core.pragma('dart2js:noInline') static SavedConstant getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SavedConstant>(create); static SavedConstant? _defaultInstance; @$pb.TagNumber(1) $core.String get operation => $_getSZ(0); @$pb.TagNumber(1) set operation($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasOperation() => $_has(0); @$pb.TagNumber(1) void clearOperation() => clearField(1); } class SavedVariable extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SavedVariable', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow'), createEmptyInstance: create) ..e<$5.DataType>( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'dtype', $pb.PbFieldType.OE, defaultOrMaker: $5.DataType.DT_INVALID, valueOf: $5.DataType.valueOf, enumValues: $5.DataType.values) ..aOM<$4.TensorShapeProto>( 2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'shape', subBuilder: $4.TensorShapeProto.create) ..aOB( 3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'trainable') ..e<$6.VariableSynchronization>( 4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'synchronization', $pb.PbFieldType.OE, defaultOrMaker: $6.VariableSynchronization.VARIABLE_SYNCHRONIZATION_AUTO, valueOf: $6.VariableSynchronization.valueOf, enumValues: $6.VariableSynchronization.values) ..e<$6.VariableAggregation>( 5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'aggregation', $pb.PbFieldType.OE, defaultOrMaker: $6.VariableAggregation.VARIABLE_AGGREGATION_NONE, valueOf: $6.VariableAggregation.valueOf, enumValues: $6.VariableAggregation.values) ..aOS( 6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') ..aOS( 7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'device') ..pc<SavedVariable>( 8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'experimentalDistributedVariableComponents', $pb.PbFieldType.PM, subBuilder: SavedVariable.create) ..hasRequiredFields = false; SavedVariable._() : super(); factory SavedVariable({ $5.DataType? dtype, $4.TensorShapeProto? shape, $core.bool? trainable, $6.VariableSynchronization? synchronization, $6.VariableAggregation? aggregation, $core.String? name, $core.String? device, $core.Iterable<SavedVariable>? experimentalDistributedVariableComponents, }) { final _result = create(); if (dtype != null) { _result.dtype = dtype; } if (shape != null) { _result.shape = shape; } if (trainable != null) { _result.trainable = trainable; } if (synchronization != null) { _result.synchronization = synchronization; } if (aggregation != null) { _result.aggregation = aggregation; } if (name != null) { _result.name = name; } if (device != null) { _result.device = device; } if (experimentalDistributedVariableComponents != null) { _result.experimentalDistributedVariableComponents .addAll(experimentalDistributedVariableComponents); } return _result; } factory SavedVariable.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory SavedVariable.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') SavedVariable clone() => SavedVariable()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') SavedVariable copyWith(void Function(SavedVariable) updates) => super.copyWith((message) => updates(message as SavedVariable)) as SavedVariable; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SavedVariable create() => SavedVariable._(); SavedVariable createEmptyInstance() => create(); static $pb.PbList<SavedVariable> createRepeated() => $pb.PbList<SavedVariable>(); @$core.pragma('dart2js:noInline') static SavedVariable getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SavedVariable>(create); static SavedVariable? _defaultInstance; @$pb.TagNumber(1) $5.DataType get dtype => $_getN(0); @$pb.TagNumber(1) set dtype($5.DataType v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasDtype() => $_has(0); @$pb.TagNumber(1) void clearDtype() => clearField(1); @$pb.TagNumber(2) $4.TensorShapeProto get shape => $_getN(1); @$pb.TagNumber(2) set shape($4.TensorShapeProto v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasShape() => $_has(1); @$pb.TagNumber(2) void clearShape() => clearField(2); @$pb.TagNumber(2) $4.TensorShapeProto ensureShape() => $_ensure(1); @$pb.TagNumber(3) $core.bool get trainable => $_getBF(2); @$pb.TagNumber(3) set trainable($core.bool v) { $_setBool(2, v); } @$pb.TagNumber(3) $core.bool hasTrainable() => $_has(2); @$pb.TagNumber(3) void clearTrainable() => clearField(3); @$pb.TagNumber(4) $6.VariableSynchronization get synchronization => $_getN(3); @$pb.TagNumber(4) set synchronization($6.VariableSynchronization v) { setField(4, v); } @$pb.TagNumber(4) $core.bool hasSynchronization() => $_has(3); @$pb.TagNumber(4) void clearSynchronization() => clearField(4); @$pb.TagNumber(5) $6.VariableAggregation get aggregation => $_getN(4); @$pb.TagNumber(5) set aggregation($6.VariableAggregation v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasAggregation() => $_has(4); @$pb.TagNumber(5) void clearAggregation() => clearField(5); @$pb.TagNumber(6) $core.String get name => $_getSZ(5); @$pb.TagNumber(6) set name($core.String v) { $_setString(5, v); } @$pb.TagNumber(6) $core.bool hasName() => $_has(5); @$pb.TagNumber(6) void clearName() => clearField(6); @$pb.TagNumber(7) $core.String get device => $_getSZ(6); @$pb.TagNumber(7) set device($core.String v) { $_setString(6, v); } @$pb.TagNumber(7) $core.bool hasDevice() => $_has(6); @$pb.TagNumber(7) void clearDevice() => clearField(7); @$pb.TagNumber(8) $core.List<SavedVariable> get experimentalDistributedVariableComponents => $_getList(7); } class FunctionSpec extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'FunctionSpec', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow'), createEmptyInstance: create) ..aOM<$3.StructuredValue>( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fullargspec', subBuilder: $3.StructuredValue.create) ..aOB( 2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'isMethod') ..aOM<$3.StructuredValue>( 5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'inputSignature', subBuilder: $3.StructuredValue.create) ..e<FunctionSpec_JitCompile>( 6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'jitCompile', $pb.PbFieldType.OE, defaultOrMaker: FunctionSpec_JitCompile.DEFAULT, valueOf: FunctionSpec_JitCompile.valueOf, enumValues: FunctionSpec_JitCompile.values) ..hasRequiredFields = false; FunctionSpec._() : super(); factory FunctionSpec({ $3.StructuredValue? fullargspec, $core.bool? isMethod, $3.StructuredValue? inputSignature, FunctionSpec_JitCompile? jitCompile, }) { final _result = create(); if (fullargspec != null) { _result.fullargspec = fullargspec; } if (isMethod != null) { _result.isMethod = isMethod; } if (inputSignature != null) { _result.inputSignature = inputSignature; } if (jitCompile != null) { _result.jitCompile = jitCompile; } return _result; } factory FunctionSpec.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory FunctionSpec.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') FunctionSpec clone() => FunctionSpec()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') FunctionSpec copyWith(void Function(FunctionSpec) updates) => super.copyWith((message) => updates(message as FunctionSpec)) as FunctionSpec; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static FunctionSpec create() => FunctionSpec._(); FunctionSpec createEmptyInstance() => create(); static $pb.PbList<FunctionSpec> createRepeated() => $pb.PbList<FunctionSpec>(); @$core.pragma('dart2js:noInline') static FunctionSpec getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<FunctionSpec>(create); static FunctionSpec? _defaultInstance; @$pb.TagNumber(1) $3.StructuredValue get fullargspec => $_getN(0); @$pb.TagNumber(1) set fullargspec($3.StructuredValue v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasFullargspec() => $_has(0); @$pb.TagNumber(1) void clearFullargspec() => clearField(1); @$pb.TagNumber(1) $3.StructuredValue ensureFullargspec() => $_ensure(0); @$pb.TagNumber(2) $core.bool get isMethod => $_getBF(1); @$pb.TagNumber(2) set isMethod($core.bool v) { $_setBool(1, v); } @$pb.TagNumber(2) $core.bool hasIsMethod() => $_has(1); @$pb.TagNumber(2) void clearIsMethod() => clearField(2); @$pb.TagNumber(5) $3.StructuredValue get inputSignature => $_getN(2); @$pb.TagNumber(5) set inputSignature($3.StructuredValue v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasInputSignature() => $_has(2); @$pb.TagNumber(5) void clearInputSignature() => clearField(5); @$pb.TagNumber(5) $3.StructuredValue ensureInputSignature() => $_ensure(2); @$pb.TagNumber(6) FunctionSpec_JitCompile get jitCompile => $_getN(3); @$pb.TagNumber(6) set jitCompile(FunctionSpec_JitCompile v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasJitCompile() => $_has(3); @$pb.TagNumber(6) void clearJitCompile() => clearField(6); } class SavedResource extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SavedResource', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow'), createEmptyInstance: create) ..aOS( 1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'device') ..hasRequiredFields = false; SavedResource._() : super(); factory SavedResource({ $core.String? device, }) { final _result = create(); if (device != null) { _result.device = device; } return _result; } factory SavedResource.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory SavedResource.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') SavedResource clone() => SavedResource()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') SavedResource copyWith(void Function(SavedResource) updates) => super.copyWith((message) => updates(message as SavedResource)) as SavedResource; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SavedResource create() => SavedResource._(); SavedResource createEmptyInstance() => create(); static $pb.PbList<SavedResource> createRepeated() => $pb.PbList<SavedResource>(); @$core.pragma('dart2js:noInline') static SavedResource getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SavedResource>(create); static SavedResource? _defaultInstance; @$pb.TagNumber(1) $core.String get device => $_getSZ(0); @$pb.TagNumber(1) set device($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasDevice() => $_has(0); @$pb.TagNumber(1) void clearDevice() => clearField(1); } class SaveableObject extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SaveableObject', package: const $pb.PackageName( const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'tensorflow'), createEmptyInstance: create) ..a<$core.int>( 2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'saveFunction', $pb.PbFieldType.O3) ..a<$core.int>( 3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'restoreFunction', $pb.PbFieldType.O3) ..hasRequiredFields = false; SaveableObject._() : super(); factory SaveableObject({ $core.int? saveFunction, $core.int? restoreFunction, }) { final _result = create(); if (saveFunction != null) { _result.saveFunction = saveFunction; } if (restoreFunction != null) { _result.restoreFunction = restoreFunction; } return _result; } factory SaveableObject.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory SaveableObject.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') SaveableObject clone() => SaveableObject()..mergeFromMessage(this); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') SaveableObject copyWith(void Function(SaveableObject) updates) => super.copyWith((message) => updates(message as SaveableObject)) as SaveableObject; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SaveableObject create() => SaveableObject._(); SaveableObject createEmptyInstance() => create(); static $pb.PbList<SaveableObject> createRepeated() => $pb.PbList<SaveableObject>(); @$core.pragma('dart2js:noInline') static SaveableObject getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SaveableObject>(create); static SaveableObject? _defaultInstance; @$pb.TagNumber(2) $core.int get saveFunction => $_getIZ(0); @$pb.TagNumber(2) set saveFunction($core.int v) { $_setSignedInt32(0, v); } @$pb.TagNumber(2) $core.bool hasSaveFunction() => $_has(0); @$pb.TagNumber(2) void clearSaveFunction() => clearField(2); @$pb.TagNumber(3) $core.int get restoreFunction => $_getIZ(1); @$pb.TagNumber(3) set restoreFunction($core.int v) { $_setSignedInt32(1, v); } @$pb.TagNumber(3) $core.bool hasRestoreFunction() => $_has(1); @$pb.TagNumber(3) void clearRestoreFunction() => clearField(3); }
codelabs/tfserving-flutter/codelab2/starter/lib/proto/generated/tensorflow/core/protobuf/saved_object_graph.pb.dart/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/starter/lib/proto/generated/tensorflow/core/protobuf/saved_object_graph.pb.dart", "repo_id": "codelabs", "token_count": 23429 }
193
/// // Generated code. Do not modify. // source: tensorflow_serving/apis/get_model_metadata.proto // // @dart = 2.12 // ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields
codelabs/tfserving-flutter/codelab2/starter/lib/proto/generated/tensorflow_serving/apis/get_model_metadata.pbenum.dart/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/starter/lib/proto/generated/tensorflow_serving/apis/get_model_metadata.pbenum.dart", "repo_id": "codelabs", "token_count": 120 }
194
/// // Generated code. Do not modify. // source: tensorflow_serving/apis/prediction_service.proto // // @dart = 2.12 // ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields import 'dart:async' as $async; import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; import 'classification.pb.dart' as $0; import 'regression.pb.dart' as $1; import 'predict.pb.dart' as $2; import 'inference.pb.dart' as $3; import 'get_model_metadata.pb.dart' as $4; export 'prediction_service.pb.dart'; class PredictionServiceClient extends $grpc.Client { static final _$classify = $grpc.ClientMethod<$0.ClassificationRequest, $0.ClassificationResponse>( '/tensorflow.serving.PredictionService/Classify', ($0.ClassificationRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $0.ClassificationResponse.fromBuffer(value)); static final _$regress = $grpc.ClientMethod<$1.RegressionRequest, $1.RegressionResponse>( '/tensorflow.serving.PredictionService/Regress', ($1.RegressionRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $1.RegressionResponse.fromBuffer(value)); static final _$predict = $grpc.ClientMethod<$2.PredictRequest, $2.PredictResponse>( '/tensorflow.serving.PredictionService/Predict', ($2.PredictRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $2.PredictResponse.fromBuffer(value)); static final _$multiInference = $grpc.ClientMethod<$3.MultiInferenceRequest, $3.MultiInferenceResponse>( '/tensorflow.serving.PredictionService/MultiInference', ($3.MultiInferenceRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $3.MultiInferenceResponse.fromBuffer(value)); static final _$getModelMetadata = $grpc.ClientMethod< $4.GetModelMetadataRequest, $4.GetModelMetadataResponse>( '/tensorflow.serving.PredictionService/GetModelMetadata', ($4.GetModelMetadataRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $4.GetModelMetadataResponse.fromBuffer(value)); PredictionServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, $core.Iterable<$grpc.ClientInterceptor>? interceptors}) : super(channel, options: options, interceptors: interceptors); $grpc.ResponseFuture<$0.ClassificationResponse> classify( $0.ClassificationRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$classify, request, options: options); } $grpc.ResponseFuture<$1.RegressionResponse> regress( $1.RegressionRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$regress, request, options: options); } $grpc.ResponseFuture<$2.PredictResponse> predict($2.PredictRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$predict, request, options: options); } $grpc.ResponseFuture<$3.MultiInferenceResponse> multiInference( $3.MultiInferenceRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$multiInference, request, options: options); } $grpc.ResponseFuture<$4.GetModelMetadataResponse> getModelMetadata( $4.GetModelMetadataRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getModelMetadata, request, options: options); } } abstract class PredictionServiceBase extends $grpc.Service { $core.String get $name => 'tensorflow.serving.PredictionService'; PredictionServiceBase() { $addMethod($grpc.ServiceMethod<$0.ClassificationRequest, $0.ClassificationResponse>( 'Classify', classify_Pre, false, false, ($core.List<$core.int> value) => $0.ClassificationRequest.fromBuffer(value), ($0.ClassificationResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$1.RegressionRequest, $1.RegressionResponse>( 'Regress', regress_Pre, false, false, ($core.List<$core.int> value) => $1.RegressionRequest.fromBuffer(value), ($1.RegressionResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$2.PredictRequest, $2.PredictResponse>( 'Predict', predict_Pre, false, false, ($core.List<$core.int> value) => $2.PredictRequest.fromBuffer(value), ($2.PredictResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$3.MultiInferenceRequest, $3.MultiInferenceResponse>( 'MultiInference', multiInference_Pre, false, false, ($core.List<$core.int> value) => $3.MultiInferenceRequest.fromBuffer(value), ($3.MultiInferenceResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$4.GetModelMetadataRequest, $4.GetModelMetadataResponse>( 'GetModelMetadata', getModelMetadata_Pre, false, false, ($core.List<$core.int> value) => $4.GetModelMetadataRequest.fromBuffer(value), ($4.GetModelMetadataResponse value) => value.writeToBuffer())); } $async.Future<$0.ClassificationResponse> classify_Pre($grpc.ServiceCall call, $async.Future<$0.ClassificationRequest> request) async { return classify(call, await request); } $async.Future<$1.RegressionResponse> regress_Pre($grpc.ServiceCall call, $async.Future<$1.RegressionRequest> request) async { return regress(call, await request); } $async.Future<$2.PredictResponse> predict_Pre( $grpc.ServiceCall call, $async.Future<$2.PredictRequest> request) async { return predict(call, await request); } $async.Future<$3.MultiInferenceResponse> multiInference_Pre( $grpc.ServiceCall call, $async.Future<$3.MultiInferenceRequest> request) async { return multiInference(call, await request); } $async.Future<$4.GetModelMetadataResponse> getModelMetadata_Pre( $grpc.ServiceCall call, $async.Future<$4.GetModelMetadataRequest> request) async { return getModelMetadata(call, await request); } $async.Future<$0.ClassificationResponse> classify( $grpc.ServiceCall call, $0.ClassificationRequest request); $async.Future<$1.RegressionResponse> regress( $grpc.ServiceCall call, $1.RegressionRequest request); $async.Future<$2.PredictResponse> predict( $grpc.ServiceCall call, $2.PredictRequest request); $async.Future<$3.MultiInferenceResponse> multiInference( $grpc.ServiceCall call, $3.MultiInferenceRequest request); $async.Future<$4.GetModelMetadataResponse> getModelMetadata( $grpc.ServiceCall call, $4.GetModelMetadataRequest request); }
codelabs/tfserving-flutter/codelab2/starter/lib/proto/generated/tensorflow_serving/apis/prediction_service.pbgrpc.dart/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/starter/lib/proto/generated/tensorflow_serving/apis/prediction_service.pbgrpc.dart", "repo_id": "codelabs", "token_count": 2738 }
195
syntax = "proto3"; package tensorflow; import "tensorflow/core/framework/resource_handle.proto"; import "tensorflow/core/framework/tensor_shape.proto"; import "tensorflow/core/framework/types.proto"; option cc_enable_arenas = true; option java_outer_classname = "TensorProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_go_proto"; // Protocol buffer representing a tensor. message TensorProto { DataType dtype = 1; // Shape of the tensor. TODO(touts): sort out the 0-rank issues. TensorShapeProto tensor_shape = 2; // Only one of the representations below is set, one of "tensor_contents" and // the "xxx_val" attributes. We are not using oneof because as oneofs cannot // contain repeated fields it would require another extra set of messages. // Version number. // // In version 0, if the "repeated xxx" representations contain only one // element, that element is repeated to fill the shape. This makes it easy // to represent a constant Tensor with a single value. int32 version_number = 3; // Serialized raw tensor content from either Tensor::AsProtoTensorContent or // memcpy in tensorflow::grpc::EncodeTensorToByteBuffer. This representation // can be used for all tensor types. The purpose of this representation is to // reduce serialization overhead during RPC call by avoiding serialization of // many repeated small items. bytes tensor_content = 4; // Type specific representations that make it easy to create tensor protos in // all languages. Only the representation corresponding to "dtype" can // be set. The values hold the flattened representation of the tensor in // row major order. // DT_HALF, DT_BFLOAT16. Note that since protobuf has no int16 type, we'll // have some pointless zero padding for each value here. repeated int32 half_val = 13 [packed = true]; // DT_FLOAT. repeated float float_val = 5 [packed = true]; // DT_DOUBLE. repeated double double_val = 6 [packed = true]; // DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8. repeated int32 int_val = 7 [packed = true]; // DT_STRING repeated bytes string_val = 8; // DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real // and imaginary parts of i-th single precision complex. repeated float scomplex_val = 9 [packed = true]; // DT_INT64 repeated int64 int64_val = 10 [packed = true]; // DT_BOOL repeated bool bool_val = 11 [packed = true]; // DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real // and imaginary parts of i-th double precision complex. repeated double dcomplex_val = 12 [packed = true]; // DT_RESOURCE repeated ResourceHandleProto resource_handle_val = 14; // DT_VARIANT repeated VariantTensorDataProto variant_val = 15; // DT_UINT32 repeated uint32 uint32_val = 16 [packed = true]; // DT_UINT64 repeated uint64 uint64_val = 17 [packed = true]; } // Protocol buffer representing the serialization format of DT_VARIANT tensors. message VariantTensorDataProto { // Name of the type of objects being serialized. string type_name = 1; // Portions of the object that are not Tensors. bytes metadata = 2; // Tensors contained within objects being serialized. repeated TensorProto tensors = 3; }
codelabs/tfserving-flutter/codelab2/starter/lib/proto/tensorflow/core/framework/tensor.proto/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/starter/lib/proto/tensorflow/core/framework/tensor.proto", "repo_id": "codelabs", "token_count": 1039 }
196
syntax = "proto3"; package tensorflow.serving; option cc_enable_arenas = true; import "tensorflow_serving/apis/classification.proto"; import "tensorflow_serving/apis/get_model_metadata.proto"; import "tensorflow_serving/apis/inference.proto"; import "tensorflow_serving/apis/predict.proto"; import "tensorflow_serving/apis/regression.proto"; // open source marker; do not remove // PredictionService provides access to machine-learned models loaded by // model_servers. service PredictionService { // Classify. rpc Classify(ClassificationRequest) returns (ClassificationResponse); // Regress. rpc Regress(RegressionRequest) returns (RegressionResponse); // Predict -- provides access to loaded TensorFlow model. rpc Predict(PredictRequest) returns (PredictResponse); // MultiInference API for multi-headed models. rpc MultiInference(MultiInferenceRequest) returns (MultiInferenceResponse); // GetModelMetadata - provides access to metadata for loaded models. rpc GetModelMetadata(GetModelMetadataRequest) returns (GetModelMetadataResponse); }
codelabs/tfserving-flutter/codelab2/starter/lib/proto/tensorflow_serving/apis/prediction_service.proto/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/starter/lib/proto/tensorflow_serving/apis/prediction_service.proto", "repo_id": "codelabs", "token_count": 315 }
197
#include "../../Flutter/Flutter-Release.xcconfig" #include "Warnings.xcconfig"
codelabs/tfserving-flutter/codelab2/starter/macos/Runner/Configs/Release.xcconfig/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/starter/macos/Runner/Configs/Release.xcconfig", "repo_id": "codelabs", "token_count": 32 }
198
// Microsoft Visual C++ generated resource script. // #pragma code_page(65001) #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (United States) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource.h\0" END 2 TEXTINCLUDE BEGIN "#include ""winres.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Icon // // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDI_APP_ICON ICON "resources\\app_icon.ico" ///////////////////////////////////////////////////////////////////////////// // // Version // #ifdef FLUTTER_BUILD_NUMBER #define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER #else #define VERSION_AS_NUMBER 1,0,0 #endif #ifdef FLUTTER_BUILD_NAME #define VERSION_AS_STRING #FLUTTER_BUILD_NAME #else #define VERSION_AS_STRING "1.0.0" #endif VS_VERSION_INFO VERSIONINFO FILEVERSION VERSION_AS_NUMBER PRODUCTVERSION VERSION_AS_NUMBER FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG #else FILEFLAGS 0x0L #endif FILEOS VOS__WINDOWS32 FILETYPE VFT_APP FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "com.example" "\0" VALUE "FileDescription", "tfserving_flutter" "\0" VALUE "FileVersion", VERSION_AS_STRING "\0" VALUE "InternalName", "tfserving_flutter" "\0" VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0" VALUE "OriginalFilename", "tfserving_flutter.exe" "\0" VALUE "ProductName", "tfserving_flutter" "\0" VALUE "ProductVersion", VERSION_AS_STRING "\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1252 END END #endif // English (United States) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED
codelabs/tfserving-flutter/codelab2/starter/windows/runner/Runner.rc/0
{ "file_path": "codelabs/tfserving-flutter/codelab2/starter/windows/runner/Runner.rc", "repo_id": "codelabs", "token_count": 1035 }
199