├── .gitignore
├── .gradle
├── 5.1.1
│ ├── fileChanges
│ │ └── last-build.bin
│ ├── fileHashes
│ │ └── fileHashes.lock
│ └── gc.properties
├── buildOutputCleanup
│ ├── buildOutputCleanup.lock
│ └── cache.properties
└── vcs-1
│ └── gc.properties
├── .idea
├── encodings.xml
├── libraries
│ ├── Dart_SDK.xml
│ ├── Flutter_Plugins.xml
│ └── Flutter_for_Android.xml
├── misc.xml
├── modules.xml
├── runConfigurations
│ └── example_lib_main_dart.xml
├── vcs.xml
└── workspace.xml
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── android
├── .gitignore
├── build.gradle
├── gradle.properties
├── settings.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── kotlin
│ └── com
│ └── ileaf
│ └── tinder_card
│ └── TinderCardPlugin.kt
├── example
├── .gitignore
├── .metadata
├── README.md
├── android
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── ileaf
│ │ │ │ │ └── tinder_card_example
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── assets
│ ├── 1.jpg
│ ├── 10.jpeg
│ ├── 2.jpg
│ ├── 3.jpg
│ ├── 5.jpg
│ ├── 6.jpg
│ ├── 7.jpeg
│ ├── 8.jpeg
│ ├── 9.jpeg
│ └── ezgif.com-video-to-gif.gif
├── ios
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Podfile.lock
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
├── lib
│ ├── main.dart
│ └── profiles.dart
├── pubspec.lock
├── pubspec.yaml
└── test
│ └── widget_test.dart
├── ios
├── .gitignore
├── Assets
│ └── .gitkeep
├── Classes
│ ├── SwiftTinderCardPlugin.swift
│ ├── TinderCardPlugin.h
│ └── TinderCardPlugin.m
└── tinder_card.podspec
├── lib
├── cards.dart
├── matches.dart
├── photos.dart
└── tinder_card.dart
├── pubspec.lock
├── pubspec.yaml
├── test
└── tinder_card_test.dart
└── tinder_card.iml
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 | build/
8 |
--------------------------------------------------------------------------------
/.gradle/5.1.1/fileChanges/last-build.bin:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gradle/5.1.1/fileHashes/fileHashes.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/.gradle/5.1.1/fileHashes/fileHashes.lock
--------------------------------------------------------------------------------
/.gradle/5.1.1/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/.gradle/5.1.1/gc.properties
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/buildOutputCleanup.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/.gradle/buildOutputCleanup/buildOutputCleanup.lock
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/cache.properties:
--------------------------------------------------------------------------------
1 | #Fri Jul 19 12:41:12 IST 2019
2 | gradle.version=5.1.1
3 |
--------------------------------------------------------------------------------
/.gradle/vcs-1/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/.gradle/vcs-1/gc.properties
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/libraries/Dart_SDK.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/.idea/libraries/Flutter_Plugins.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/Flutter_for_Android.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/example_lib_main_dart.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 | MediaQuery
144 | RECOVER
145 | swipeCompleteCallback
146 | LEFT
147 | TriggerListener
148 | CardSwipeOrientation
149 | Profile
150 | matchEngine
151 | _desiredSlideOutDirection
152 | _slideLeft
153 | DraggableCard
154 | slideTo
155 | didUpdateWidget
156 | return null
157 | slideOutAnimation
158 | _buildBottomBar
159 |
160 |
161 |
162 |
163 |
164 |
165 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 | 1563511975031
271 |
272 |
273 | 1563511975031
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 | file://$PROJECT_DIR$/lib/cards.dart
315 | 137
316 |
317 |
318 |
319 | file://$PROJECT_DIR$/lib/cards.dart
320 | 322
321 |
322 |
323 |
324 | file://$PROJECT_DIR$/lib/cards.dart
325 | 312
326 |
327 |
328 |
329 | file://$PROJECT_DIR$/lib/cards.dart
330 | 290
331 |
332 |
333 |
334 | file://$PROJECT_DIR$/lib/matches.dart
335 | 34
336 |
337 |
338 |
339 | file://$PROJECT_DIR$/lib/cards.dart
340 | 271
341 |
342 |
343 |
344 | file://$PROJECT_DIR$/lib/cards.dart
345 | 275
346 |
347 |
348 |
349 | file://$PROJECT_DIR$/lib/cards.dart
350 | 277
351 |
352 |
353 |
354 | file://$PROJECT_DIR$/lib/cards.dart
355 | 261
356 |
357 |
358 |
359 | file://$PROJECT_DIR$/lib/cards.dart
360 | 157
361 |
362 |
363 |
364 | file://$PROJECT_DIR$/lib/cards.dart
365 | 125
366 |
367 |
368 |
369 | file://$PROJECT_DIR$/lib/cards.dart
370 | 333
371 |
372 |
373 |
374 | file://$PROJECT_DIR$/lib/cards.dart
375 | 309
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: b712a172f9694745f50505c93340883493b505e5
8 | channel: stable
9 |
10 | project_type: plugin
11 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.1.0
2 |
3 | * TODO: Describe initial release.
4 |
5 | ## 0.1.1
6 |
7 | * removed the unused function.
8 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | TODO: Add your license here.
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # tinder_card
2 |
3 |
4 |
5 | ## Getting Started
6 |
7 | A sample Tinder Card with swipe effects with multiple images showing in a card.
8 |
9 |
10 |
11 | ## Demo
12 |
13 | 
14 |
15 | *See example for details*
16 |
17 |
18 | ## Usage
19 |
20 | Add the package to your `pubspec.yml` file.
21 |
22 | ```yml
23 | dependencies:
24 | tinder_card: ^0.1.1
25 | ```
26 |
27 | ## Install it
28 |
29 | You can install packages from the command line:
30 |
31 | with Flutter:
32 |
33 | ```dart
34 | $ flutter pub get
35 | ```
36 |
37 | Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.
38 |
39 | # Import it
40 |
41 | Now in your Dart code, you can use:
42 |
43 | ```dart
44 | 'import 'package:tinder_card/tinder_card.dart';
45 | ```
46 |
47 | ## How to pass the card data
48 |
49 | Here we are using a common data structure for the card detail
50 | Here i'm usind a model class for the data handling
51 | ```dart
52 |
53 | class Profile {
54 | final List photos;
55 | final String name;
56 | final String bio;
57 |
58 | Profile({this.photos, this.name, this.bio});
59 | }
60 | ```
61 | adding some dummy data to the Profile model
62 | ```dart
63 | //dummy data
64 | final List demoProfiles = [
65 | new Profile(
66 | photos: [
67 | "assets/3.jpg",
68 | "assets/2.jpg",
69 | "assets/1.jpg",
70 | "assets/3.jpg",
71 | "assets/2.jpg",
72 | "assets/1.jpg",
73 | ],
74 | name: "Aneesh G",
75 | bio: "This is the person you want",
76 | ),
77 | ];
78 |
79 | ```
80 |
81 | ### Show the tinder card in the Scaffold
82 |
83 | ```dart
84 | @override
85 | Widget build(BuildContext context) {
86 | return MaterialApp(
87 | home: Scaffold(
88 | body: TinderSwapCard(
89 | demoProfiles: demoProfiles,
90 | myCallback: (decision) {},
91 | )),
92 | );
93 | }
94 | ```
95 |
96 |
97 |
98 |
99 |
100 |
101 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | group 'com.ileaf.tinder_card'
2 | version '1.0-SNAPSHOT'
3 |
4 | buildscript {
5 | ext.kotlin_version = '1.3.50'
6 | repositories {
7 | google()
8 | jcenter()
9 | }
10 |
11 | dependencies {
12 | classpath 'com.android.tools.build:gradle:3.2.1'
13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
14 | }
15 | }
16 |
17 | rootProject.allprojects {
18 | repositories {
19 | google()
20 | jcenter()
21 | }
22 | }
23 |
24 | apply plugin: 'com.android.library'
25 | apply plugin: 'kotlin-android'
26 |
27 | android {
28 | compileSdkVersion 28
29 |
30 | sourceSets {
31 | main.java.srcDirs += 'src/main/kotlin'
32 | }
33 | defaultConfig {
34 | minSdkVersion 16
35 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
36 | }
37 | lintOptions {
38 | disable 'InvalidPackage'
39 | }
40 | }
41 |
42 | dependencies {
43 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
44 | }
45 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
3 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'tinder_card'
2 |
--------------------------------------------------------------------------------
/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/android/src/main/kotlin/com/ileaf/tinder_card/TinderCardPlugin.kt:
--------------------------------------------------------------------------------
1 | package com.ileaf.tinder_card
2 |
3 | import io.flutter.plugin.common.MethodCall
4 | import io.flutter.plugin.common.MethodChannel
5 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler
6 | import io.flutter.plugin.common.MethodChannel.Result
7 | import io.flutter.plugin.common.PluginRegistry.Registrar
8 |
9 | class TinderCardPlugin: MethodCallHandler {
10 | companion object {
11 | @JvmStatic
12 | fun registerWith(registrar: Registrar) {
13 | val channel = MethodChannel(registrar.messenger(), "tinder_card")
14 | channel.setMethodCallHandler(TinderCardPlugin())
15 | }
16 | }
17 |
18 | override fun onMethodCall(call: MethodCall, result: Result) {
19 | if (call.method == "getPlatformVersion") {
20 | result.success("Android ${android.os.Build.VERSION.RELEASE}")
21 | } else {
22 | result.notImplemented()
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .packages
28 | .pub-cache/
29 | .pub/
30 | /build/
31 |
32 | # Android related
33 | **/android/**/gradle-wrapper.jar
34 | **/android/.gradle
35 | **/android/captures/
36 | **/android/gradlew
37 | **/android/gradlew.bat
38 | **/android/local.properties
39 | **/android/**/GeneratedPluginRegistrant.java
40 |
41 | # iOS/XCode related
42 | **/ios/**/*.mode1v3
43 | **/ios/**/*.mode2v3
44 | **/ios/**/*.moved-aside
45 | **/ios/**/*.pbxuser
46 | **/ios/**/*.perspectivev3
47 | **/ios/**/*sync/
48 | **/ios/**/.sconsign.dblite
49 | **/ios/**/.tags*
50 | **/ios/**/.vagrant/
51 | **/ios/**/DerivedData/
52 | **/ios/**/Icon?
53 | **/ios/**/Pods/
54 | **/ios/**/.symlinks/
55 | **/ios/**/profile
56 | **/ios/**/xcuserdata
57 | **/ios/.generated/
58 | **/ios/Flutter/App.framework
59 | **/ios/Flutter/Flutter.framework
60 | **/ios/Flutter/Generated.xcconfig
61 | **/ios/Flutter/app.flx
62 | **/ios/Flutter/app.zip
63 | **/ios/Flutter/flutter_assets/
64 | **/ios/ServiceDefinitions.json
65 | **/ios/Runner/GeneratedPluginRegistrant.*
66 |
67 | # Exceptions to above rules.
68 | !**/ios/**/default.mode1v3
69 | !**/ios/**/default.mode2v3
70 | !**/ios/**/default.pbxuser
71 | !**/ios/**/default.perspectivev3
72 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
73 |
--------------------------------------------------------------------------------
/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: b712a172f9694745f50505c93340883493b505e5
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # tinder_card_example
2 |
3 | Demonstrates how to use the tinder_card plugin.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 28
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.ileaf.tinder_card_example"
42 | minSdkVersion 16
43 | targetSdkVersion 28
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
47 | }
48 |
49 | buildTypes {
50 | release {
51 | // TODO: Add your own signing config for the release build.
52 | // Signing with the debug keys for now, so `flutter run --release` works.
53 | signingConfig signingConfigs.debug
54 | }
55 | }
56 | }
57 |
58 | flutter {
59 | source '../..'
60 | }
61 |
62 | dependencies {
63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
64 | testImplementation 'junit:junit:4.12'
65 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
66 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
67 | }
68 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
13 |
20 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/example/android/app/src/main/kotlin/com/ileaf/tinder_card_example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.ileaf.tinder_card_example
2 |
3 | import android.os.Bundle
4 |
5 | import io.flutter.app.FlutterActivity
6 | import io.flutter.plugins.GeneratedPluginRegistrant
7 |
8 | class MainActivity: FlutterActivity() {
9 | override fun onCreate(savedInstanceState: Bundle?) {
10 | super.onCreate(savedInstanceState)
11 | GeneratedPluginRegistrant.registerWith(this)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.2.71'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.2.1'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
3 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
7 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/example/assets/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/assets/1.jpg
--------------------------------------------------------------------------------
/example/assets/10.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/assets/10.jpeg
--------------------------------------------------------------------------------
/example/assets/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/assets/2.jpg
--------------------------------------------------------------------------------
/example/assets/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/assets/3.jpg
--------------------------------------------------------------------------------
/example/assets/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/assets/5.jpg
--------------------------------------------------------------------------------
/example/assets/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/assets/6.jpg
--------------------------------------------------------------------------------
/example/assets/7.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/assets/7.jpeg
--------------------------------------------------------------------------------
/example/assets/8.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/assets/8.jpeg
--------------------------------------------------------------------------------
/example/assets/9.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/assets/9.jpeg
--------------------------------------------------------------------------------
/example/assets/ezgif.com-video-to-gif.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/assets/ezgif.com-video-to-gif.gif
--------------------------------------------------------------------------------
/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def parse_KV_file(file, separator='=')
14 | file_abs_path = File.expand_path(file)
15 | if !File.exists? file_abs_path
16 | return [];
17 | end
18 | pods_ary = []
19 | skip_line_start_symbols = ["#", "/"]
20 | File.foreach(file_abs_path) { |line|
21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
22 | plugin = line.split(pattern=separator)
23 | if plugin.length == 2
24 | podname = plugin[0].strip()
25 | path = plugin[1].strip()
26 | podpath = File.expand_path("#{path}", file_abs_path)
27 | pods_ary.push({:name => podname, :path => podpath});
28 | else
29 | puts "Invalid plugin specification: #{line}"
30 | end
31 | }
32 | return pods_ary
33 | end
34 |
35 | target 'Runner' do
36 | use_frameworks!
37 |
38 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
39 | # referring to absolute paths on developers' machines.
40 | system('rm -rf .symlinks')
41 | system('mkdir -p .symlinks/plugins')
42 |
43 | # Flutter Pods
44 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
45 | if generated_xcode_build_settings.empty?
46 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first."
47 | end
48 | generated_xcode_build_settings.map { |p|
49 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
50 | symlink = File.join('.symlinks', 'flutter')
51 | File.symlink(File.dirname(p[:path]), symlink)
52 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
53 | end
54 | }
55 |
56 | # Plugin Pods
57 | plugin_pods = parse_KV_file('../.flutter-plugins')
58 | plugin_pods.map { |p|
59 | symlink = File.join('.symlinks', 'plugins', p[:name])
60 | File.symlink(p[:path], symlink)
61 | pod p[:name], :path => File.join(symlink, 'ios')
62 | }
63 | end
64 |
65 | # Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
66 | install! 'cocoapods', :disable_input_output_paths => true
67 |
68 | post_install do |installer|
69 | installer.pods_project.targets.each do |target|
70 | target.build_configurations.each do |config|
71 | config.build_settings['ENABLE_BITCODE'] = 'NO'
72 | end
73 | end
74 | end
75 |
--------------------------------------------------------------------------------
/example/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Flutter (1.0.0)
3 | - tinder_card (0.0.1):
4 | - Flutter
5 |
6 | DEPENDENCIES:
7 | - Flutter (from `.symlinks/flutter/ios`)
8 | - tinder_card (from `.symlinks/plugins/tinder_card/ios`)
9 |
10 | EXTERNAL SOURCES:
11 | Flutter:
12 | :path: ".symlinks/flutter/ios"
13 | tinder_card:
14 | :path: ".symlinks/plugins/tinder_card/ios"
15 |
16 | SPEC CHECKSUMS:
17 | Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a
18 | tinder_card: 5fa72983340b21d0734b17f7830305a67289d6e1
19 |
20 | PODFILE CHECKSUM: b6a0a141693093b304368d08511b46cf3d1d0ac5
21 |
22 | COCOAPODS: 1.6.1
23 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 0760404C57F27C0873E62DFF /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C6BCCFF15E4B2A016A66B955 /* Pods_Runner.framework */; };
11 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
15 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
16 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
17 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
19 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
20 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
21 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
22 | /* End PBXBuildFile section */
23 |
24 | /* Begin PBXCopyFilesBuildPhase section */
25 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
26 | isa = PBXCopyFilesBuildPhase;
27 | buildActionMask = 2147483647;
28 | dstPath = "";
29 | dstSubfolderSpec = 10;
30 | files = (
31 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
32 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
33 | );
34 | name = "Embed Frameworks";
35 | runOnlyForDeploymentPostprocessing = 0;
36 | };
37 | /* End PBXCopyFilesBuildPhase section */
38 |
39 | /* Begin PBXFileReference section */
40 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
41 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
42 | 32443441E3A576B7DB64C69A /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
43 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
44 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
45 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
46 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
47 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
48 | 847CEB0D0EA592FAE19ED180 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
49 | 90A32070D36F1AA4B4858B96 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
50 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
51 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
52 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
53 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
54 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
55 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
56 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
57 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
58 | C6BCCFF15E4B2A016A66B955 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
59 | /* End PBXFileReference section */
60 |
61 | /* Begin PBXFrameworksBuildPhase section */
62 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
63 | isa = PBXFrameworksBuildPhase;
64 | buildActionMask = 2147483647;
65 | files = (
66 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
67 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
68 | 0760404C57F27C0873E62DFF /* Pods_Runner.framework in Frameworks */,
69 | );
70 | runOnlyForDeploymentPostprocessing = 0;
71 | };
72 | /* End PBXFrameworksBuildPhase section */
73 |
74 | /* Begin PBXGroup section */
75 | 0F8A0EECCC040A32824F822A /* Pods */ = {
76 | isa = PBXGroup;
77 | children = (
78 | 32443441E3A576B7DB64C69A /* Pods-Runner.debug.xcconfig */,
79 | 847CEB0D0EA592FAE19ED180 /* Pods-Runner.release.xcconfig */,
80 | 90A32070D36F1AA4B4858B96 /* Pods-Runner.profile.xcconfig */,
81 | );
82 | path = Pods;
83 | sourceTree = "";
84 | };
85 | 9740EEB11CF90186004384FC /* Flutter */ = {
86 | isa = PBXGroup;
87 | children = (
88 | 3B80C3931E831B6300D905FE /* App.framework */,
89 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
90 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
91 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
92 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
93 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
94 | );
95 | name = Flutter;
96 | sourceTree = "";
97 | };
98 | 97C146E51CF9000F007C117D = {
99 | isa = PBXGroup;
100 | children = (
101 | 9740EEB11CF90186004384FC /* Flutter */,
102 | 97C146F01CF9000F007C117D /* Runner */,
103 | 97C146EF1CF9000F007C117D /* Products */,
104 | 0F8A0EECCC040A32824F822A /* Pods */,
105 | ABA9E55C8EA1F9D0A7C7169E /* Frameworks */,
106 | );
107 | sourceTree = "";
108 | };
109 | 97C146EF1CF9000F007C117D /* Products */ = {
110 | isa = PBXGroup;
111 | children = (
112 | 97C146EE1CF9000F007C117D /* Runner.app */,
113 | );
114 | name = Products;
115 | sourceTree = "";
116 | };
117 | 97C146F01CF9000F007C117D /* Runner */ = {
118 | isa = PBXGroup;
119 | children = (
120 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
121 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
122 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
123 | 97C147021CF9000F007C117D /* Info.plist */,
124 | 97C146F11CF9000F007C117D /* Supporting Files */,
125 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
126 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
127 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
128 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
129 | );
130 | path = Runner;
131 | sourceTree = "";
132 | };
133 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
134 | isa = PBXGroup;
135 | children = (
136 | );
137 | name = "Supporting Files";
138 | sourceTree = "";
139 | };
140 | ABA9E55C8EA1F9D0A7C7169E /* Frameworks */ = {
141 | isa = PBXGroup;
142 | children = (
143 | C6BCCFF15E4B2A016A66B955 /* Pods_Runner.framework */,
144 | );
145 | name = Frameworks;
146 | sourceTree = "";
147 | };
148 | /* End PBXGroup section */
149 |
150 | /* Begin PBXNativeTarget section */
151 | 97C146ED1CF9000F007C117D /* Runner */ = {
152 | isa = PBXNativeTarget;
153 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
154 | buildPhases = (
155 | ED25F33CAFC2CD7279B6314A /* [CP] Check Pods Manifest.lock */,
156 | 9740EEB61CF901F6004384FC /* Run Script */,
157 | 97C146EA1CF9000F007C117D /* Sources */,
158 | 97C146EB1CF9000F007C117D /* Frameworks */,
159 | 97C146EC1CF9000F007C117D /* Resources */,
160 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
161 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
162 | 4FB3B0DD33542457F51AD269 /* [CP] Embed Pods Frameworks */,
163 | );
164 | buildRules = (
165 | );
166 | dependencies = (
167 | );
168 | name = Runner;
169 | productName = Runner;
170 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
171 | productType = "com.apple.product-type.application";
172 | };
173 | /* End PBXNativeTarget section */
174 |
175 | /* Begin PBXProject section */
176 | 97C146E61CF9000F007C117D /* Project object */ = {
177 | isa = PBXProject;
178 | attributes = {
179 | LastUpgradeCheck = 1020;
180 | ORGANIZATIONNAME = "The Chromium Authors";
181 | TargetAttributes = {
182 | 97C146ED1CF9000F007C117D = {
183 | CreatedOnToolsVersion = 7.3.1;
184 | DevelopmentTeam = Y6AK6TF2DS;
185 | LastSwiftMigration = 0910;
186 | };
187 | };
188 | };
189 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
190 | compatibilityVersion = "Xcode 3.2";
191 | developmentRegion = en;
192 | hasScannedForEncodings = 0;
193 | knownRegions = (
194 | en,
195 | Base,
196 | );
197 | mainGroup = 97C146E51CF9000F007C117D;
198 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
199 | projectDirPath = "";
200 | projectRoot = "";
201 | targets = (
202 | 97C146ED1CF9000F007C117D /* Runner */,
203 | );
204 | };
205 | /* End PBXProject section */
206 |
207 | /* Begin PBXResourcesBuildPhase section */
208 | 97C146EC1CF9000F007C117D /* Resources */ = {
209 | isa = PBXResourcesBuildPhase;
210 | buildActionMask = 2147483647;
211 | files = (
212 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
213 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
214 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
215 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
216 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
217 | );
218 | runOnlyForDeploymentPostprocessing = 0;
219 | };
220 | /* End PBXResourcesBuildPhase section */
221 |
222 | /* Begin PBXShellScriptBuildPhase section */
223 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
224 | isa = PBXShellScriptBuildPhase;
225 | buildActionMask = 2147483647;
226 | files = (
227 | );
228 | inputPaths = (
229 | );
230 | name = "Thin Binary";
231 | outputPaths = (
232 | );
233 | runOnlyForDeploymentPostprocessing = 0;
234 | shellPath = /bin/sh;
235 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
236 | };
237 | 4FB3B0DD33542457F51AD269 /* [CP] Embed Pods Frameworks */ = {
238 | isa = PBXShellScriptBuildPhase;
239 | buildActionMask = 2147483647;
240 | files = (
241 | );
242 | inputFileListPaths = (
243 | );
244 | inputPaths = (
245 | );
246 | name = "[CP] Embed Pods Frameworks";
247 | outputFileListPaths = (
248 | );
249 | outputPaths = (
250 | );
251 | runOnlyForDeploymentPostprocessing = 0;
252 | shellPath = /bin/sh;
253 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
254 | showEnvVarsInLog = 0;
255 | };
256 | 9740EEB61CF901F6004384FC /* Run Script */ = {
257 | isa = PBXShellScriptBuildPhase;
258 | buildActionMask = 2147483647;
259 | files = (
260 | );
261 | inputPaths = (
262 | );
263 | name = "Run Script";
264 | outputPaths = (
265 | );
266 | runOnlyForDeploymentPostprocessing = 0;
267 | shellPath = /bin/sh;
268 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
269 | };
270 | ED25F33CAFC2CD7279B6314A /* [CP] Check Pods Manifest.lock */ = {
271 | isa = PBXShellScriptBuildPhase;
272 | buildActionMask = 2147483647;
273 | files = (
274 | );
275 | inputFileListPaths = (
276 | );
277 | inputPaths = (
278 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
279 | "${PODS_ROOT}/Manifest.lock",
280 | );
281 | name = "[CP] Check Pods Manifest.lock";
282 | outputFileListPaths = (
283 | );
284 | outputPaths = (
285 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
286 | );
287 | runOnlyForDeploymentPostprocessing = 0;
288 | shellPath = /bin/sh;
289 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
290 | showEnvVarsInLog = 0;
291 | };
292 | /* End PBXShellScriptBuildPhase section */
293 |
294 | /* Begin PBXSourcesBuildPhase section */
295 | 97C146EA1CF9000F007C117D /* Sources */ = {
296 | isa = PBXSourcesBuildPhase;
297 | buildActionMask = 2147483647;
298 | files = (
299 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
300 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
301 | );
302 | runOnlyForDeploymentPostprocessing = 0;
303 | };
304 | /* End PBXSourcesBuildPhase section */
305 |
306 | /* Begin PBXVariantGroup section */
307 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
308 | isa = PBXVariantGroup;
309 | children = (
310 | 97C146FB1CF9000F007C117D /* Base */,
311 | );
312 | name = Main.storyboard;
313 | sourceTree = "";
314 | };
315 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
316 | isa = PBXVariantGroup;
317 | children = (
318 | 97C147001CF9000F007C117D /* Base */,
319 | );
320 | name = LaunchScreen.storyboard;
321 | sourceTree = "";
322 | };
323 | /* End PBXVariantGroup section */
324 |
325 | /* Begin XCBuildConfiguration section */
326 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
327 | isa = XCBuildConfiguration;
328 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
329 | buildSettings = {
330 | ALWAYS_SEARCH_USER_PATHS = NO;
331 | CLANG_ANALYZER_NONNULL = YES;
332 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
333 | CLANG_CXX_LIBRARY = "libc++";
334 | CLANG_ENABLE_MODULES = YES;
335 | CLANG_ENABLE_OBJC_ARC = YES;
336 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
337 | CLANG_WARN_BOOL_CONVERSION = YES;
338 | CLANG_WARN_COMMA = YES;
339 | CLANG_WARN_CONSTANT_CONVERSION = YES;
340 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
341 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
342 | CLANG_WARN_EMPTY_BODY = YES;
343 | CLANG_WARN_ENUM_CONVERSION = YES;
344 | CLANG_WARN_INFINITE_RECURSION = YES;
345 | CLANG_WARN_INT_CONVERSION = YES;
346 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
347 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
348 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
349 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
350 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
351 | CLANG_WARN_STRICT_PROTOTYPES = YES;
352 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
353 | CLANG_WARN_UNREACHABLE_CODE = YES;
354 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
355 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
356 | COPY_PHASE_STRIP = NO;
357 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
358 | ENABLE_NS_ASSERTIONS = NO;
359 | ENABLE_STRICT_OBJC_MSGSEND = YES;
360 | GCC_C_LANGUAGE_STANDARD = gnu99;
361 | GCC_NO_COMMON_BLOCKS = YES;
362 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
363 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
364 | GCC_WARN_UNDECLARED_SELECTOR = YES;
365 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
366 | GCC_WARN_UNUSED_FUNCTION = YES;
367 | GCC_WARN_UNUSED_VARIABLE = YES;
368 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
369 | MTL_ENABLE_DEBUG_INFO = NO;
370 | SDKROOT = iphoneos;
371 | TARGETED_DEVICE_FAMILY = "1,2";
372 | VALIDATE_PRODUCT = YES;
373 | };
374 | name = Profile;
375 | };
376 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
377 | isa = XCBuildConfiguration;
378 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
379 | buildSettings = {
380 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
381 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
382 | DEVELOPMENT_TEAM = Y6AK6TF2DS;
383 | ENABLE_BITCODE = NO;
384 | FRAMEWORK_SEARCH_PATHS = (
385 | "$(inherited)",
386 | "$(PROJECT_DIR)/Flutter",
387 | );
388 | INFOPLIST_FILE = Runner/Info.plist;
389 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
390 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
391 | LIBRARY_SEARCH_PATHS = (
392 | "$(inherited)",
393 | "$(PROJECT_DIR)/Flutter",
394 | );
395 | PRODUCT_BUNDLE_IDENTIFIER = com.ileaf.tinderCardExample;
396 | PRODUCT_NAME = "$(TARGET_NAME)";
397 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
398 | SWIFT_VERSION = 4.0;
399 | TARGETED_DEVICE_FAMILY = "1,2";
400 | VERSIONING_SYSTEM = "apple-generic";
401 | };
402 | name = Profile;
403 | };
404 | 97C147031CF9000F007C117D /* Debug */ = {
405 | isa = XCBuildConfiguration;
406 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
407 | buildSettings = {
408 | ALWAYS_SEARCH_USER_PATHS = NO;
409 | CLANG_ANALYZER_NONNULL = YES;
410 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
411 | CLANG_CXX_LIBRARY = "libc++";
412 | CLANG_ENABLE_MODULES = YES;
413 | CLANG_ENABLE_OBJC_ARC = YES;
414 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
415 | CLANG_WARN_BOOL_CONVERSION = YES;
416 | CLANG_WARN_COMMA = YES;
417 | CLANG_WARN_CONSTANT_CONVERSION = YES;
418 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
419 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
420 | CLANG_WARN_EMPTY_BODY = YES;
421 | CLANG_WARN_ENUM_CONVERSION = YES;
422 | CLANG_WARN_INFINITE_RECURSION = YES;
423 | CLANG_WARN_INT_CONVERSION = YES;
424 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
425 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
426 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
427 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
428 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
429 | CLANG_WARN_STRICT_PROTOTYPES = YES;
430 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
431 | CLANG_WARN_UNREACHABLE_CODE = YES;
432 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
433 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
434 | COPY_PHASE_STRIP = NO;
435 | DEBUG_INFORMATION_FORMAT = dwarf;
436 | ENABLE_STRICT_OBJC_MSGSEND = YES;
437 | ENABLE_TESTABILITY = YES;
438 | GCC_C_LANGUAGE_STANDARD = gnu99;
439 | GCC_DYNAMIC_NO_PIC = NO;
440 | GCC_NO_COMMON_BLOCKS = YES;
441 | GCC_OPTIMIZATION_LEVEL = 0;
442 | GCC_PREPROCESSOR_DEFINITIONS = (
443 | "DEBUG=1",
444 | "$(inherited)",
445 | );
446 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
447 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
448 | GCC_WARN_UNDECLARED_SELECTOR = YES;
449 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
450 | GCC_WARN_UNUSED_FUNCTION = YES;
451 | GCC_WARN_UNUSED_VARIABLE = YES;
452 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
453 | MTL_ENABLE_DEBUG_INFO = YES;
454 | ONLY_ACTIVE_ARCH = YES;
455 | SDKROOT = iphoneos;
456 | TARGETED_DEVICE_FAMILY = "1,2";
457 | };
458 | name = Debug;
459 | };
460 | 97C147041CF9000F007C117D /* Release */ = {
461 | isa = XCBuildConfiguration;
462 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
463 | buildSettings = {
464 | ALWAYS_SEARCH_USER_PATHS = NO;
465 | CLANG_ANALYZER_NONNULL = YES;
466 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
467 | CLANG_CXX_LIBRARY = "libc++";
468 | CLANG_ENABLE_MODULES = YES;
469 | CLANG_ENABLE_OBJC_ARC = YES;
470 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
471 | CLANG_WARN_BOOL_CONVERSION = YES;
472 | CLANG_WARN_COMMA = YES;
473 | CLANG_WARN_CONSTANT_CONVERSION = YES;
474 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
475 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
476 | CLANG_WARN_EMPTY_BODY = YES;
477 | CLANG_WARN_ENUM_CONVERSION = YES;
478 | CLANG_WARN_INFINITE_RECURSION = YES;
479 | CLANG_WARN_INT_CONVERSION = YES;
480 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
481 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
482 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
483 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
484 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
485 | CLANG_WARN_STRICT_PROTOTYPES = YES;
486 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
487 | CLANG_WARN_UNREACHABLE_CODE = YES;
488 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
489 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
490 | COPY_PHASE_STRIP = NO;
491 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
492 | ENABLE_NS_ASSERTIONS = NO;
493 | ENABLE_STRICT_OBJC_MSGSEND = YES;
494 | GCC_C_LANGUAGE_STANDARD = gnu99;
495 | GCC_NO_COMMON_BLOCKS = YES;
496 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
497 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
498 | GCC_WARN_UNDECLARED_SELECTOR = YES;
499 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
500 | GCC_WARN_UNUSED_FUNCTION = YES;
501 | GCC_WARN_UNUSED_VARIABLE = YES;
502 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
503 | MTL_ENABLE_DEBUG_INFO = NO;
504 | SDKROOT = iphoneos;
505 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
506 | TARGETED_DEVICE_FAMILY = "1,2";
507 | VALIDATE_PRODUCT = YES;
508 | };
509 | name = Release;
510 | };
511 | 97C147061CF9000F007C117D /* Debug */ = {
512 | isa = XCBuildConfiguration;
513 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
514 | buildSettings = {
515 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
516 | CLANG_ENABLE_MODULES = YES;
517 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
518 | DEVELOPMENT_TEAM = Y6AK6TF2DS;
519 | ENABLE_BITCODE = NO;
520 | FRAMEWORK_SEARCH_PATHS = (
521 | "$(inherited)",
522 | "$(PROJECT_DIR)/Flutter",
523 | );
524 | INFOPLIST_FILE = Runner/Info.plist;
525 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
526 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
527 | LIBRARY_SEARCH_PATHS = (
528 | "$(inherited)",
529 | "$(PROJECT_DIR)/Flutter",
530 | );
531 | PRODUCT_BUNDLE_IDENTIFIER = com.ileaf.tinderCardExample;
532 | PRODUCT_NAME = "$(TARGET_NAME)";
533 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
534 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
535 | SWIFT_SWIFT3_OBJC_INFERENCE = On;
536 | SWIFT_VERSION = 4.0;
537 | TARGETED_DEVICE_FAMILY = "1,2";
538 | VERSIONING_SYSTEM = "apple-generic";
539 | };
540 | name = Debug;
541 | };
542 | 97C147071CF9000F007C117D /* Release */ = {
543 | isa = XCBuildConfiguration;
544 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
545 | buildSettings = {
546 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
547 | CLANG_ENABLE_MODULES = YES;
548 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
549 | DEVELOPMENT_TEAM = Y6AK6TF2DS;
550 | ENABLE_BITCODE = NO;
551 | FRAMEWORK_SEARCH_PATHS = (
552 | "$(inherited)",
553 | "$(PROJECT_DIR)/Flutter",
554 | );
555 | INFOPLIST_FILE = Runner/Info.plist;
556 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
557 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
558 | LIBRARY_SEARCH_PATHS = (
559 | "$(inherited)",
560 | "$(PROJECT_DIR)/Flutter",
561 | );
562 | PRODUCT_BUNDLE_IDENTIFIER = com.ileaf.tinderCardExample;
563 | PRODUCT_NAME = "$(TARGET_NAME)";
564 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
565 | SWIFT_SWIFT3_OBJC_INFERENCE = On;
566 | SWIFT_VERSION = 4.0;
567 | TARGETED_DEVICE_FAMILY = "1,2";
568 | VERSIONING_SYSTEM = "apple-generic";
569 | };
570 | name = Release;
571 | };
572 | /* End XCBuildConfiguration section */
573 |
574 | /* Begin XCConfigurationList section */
575 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
576 | isa = XCConfigurationList;
577 | buildConfigurations = (
578 | 97C147031CF9000F007C117D /* Debug */,
579 | 97C147041CF9000F007C117D /* Release */,
580 | 249021D3217E4FDB00AE95B9 /* Profile */,
581 | );
582 | defaultConfigurationIsVisible = 0;
583 | defaultConfigurationName = Release;
584 | };
585 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
586 | isa = XCConfigurationList;
587 | buildConfigurations = (
588 | 97C147061CF9000F007C117D /* Debug */,
589 | 97C147071CF9000F007C117D /* Release */,
590 | 249021D4217E4FDB00AE95B9 /* Profile */,
591 | );
592 | defaultConfigurationIsVisible = 0;
593 | defaultConfigurationName = Release;
594 | };
595 | /* End XCConfigurationList section */
596 | };
597 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
598 | }
599 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | tinder_card_example
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 |
33 | UISupportedInterfaceOrientations~ipad
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationPortraitUpsideDown
37 | UIInterfaceOrientationLandscapeLeft
38 | UIInterfaceOrientationLandscapeRight
39 |
40 | UIViewControllerBasedStatusBarAppearance
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:tinder_card/tinder_card.dart';
3 | import 'package:tinder_card_example/profiles.dart';
4 |
5 | void main() => runApp(MyApp());
6 |
7 | class MyApp extends StatefulWidget {
8 | @override
9 | _MyAppState createState() => _MyAppState();
10 | }
11 |
12 | class _MyAppState extends State {
13 | @override
14 | Widget build(BuildContext context) {
15 | return MaterialApp(
16 | home: Scaffold(
17 | body: TinderSwapCard(
18 | demoProfiles: demoProfiles,
19 | myCallback: (decision) {},
20 | )),
21 | );
22 | }
23 | }
24 |
25 | //dummy data
26 | final List demoProfiles = [
27 | new Profile(
28 | photos: [
29 | "assets/1.jpg",
30 | "assets/2.jpg",
31 | "assets/3.jpg",
32 | "assets/1.jpg",
33 | "assets/2.jpg",
34 | "assets/3.jpg",
35 | ],
36 | name: "Ansh mathey",
37 | bio: "This is the person you want",
38 | ),
39 | new Profile(
40 | photos: [
41 | "assets/5.jpg",
42 | "assets/6.jpg",
43 | ],
44 | name: "Amanda Tylor",
45 | bio: "You better swpe left",
46 | ),
47 | new Profile(
48 | photos: [
49 | "assets/7.jpeg",
50 | "assets/8.jpeg",
51 | ],
52 | name: "Godson Mathew",
53 | bio: "You better swpe left",
54 | ),
55 | new Profile(
56 | photos: [
57 | "assets/9.jpeg",
58 | "assets/10.jpeg",
59 | "assets/9.jpeg",
60 | "assets/10.jpeg",
61 | ],
62 | name: "Godson Mathew",
63 | bio: "You better swpe left",
64 | ),
65 | ];
66 |
--------------------------------------------------------------------------------
/example/lib/profiles.dart:
--------------------------------------------------------------------------------
1 | class Profile {
2 | final List photos;
3 | final String name;
4 | final String bio;
5 |
6 | Profile({this.photos, this.name, this.bio});
7 | }
8 |
--------------------------------------------------------------------------------
/example/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.2.0"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "1.0.4"
18 | charcode:
19 | dependency: transitive
20 | description:
21 | name: charcode
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.2"
25 | collection:
26 | dependency: transitive
27 | description:
28 | name: collection
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.14.11"
32 | cupertino_icons:
33 | dependency: "direct main"
34 | description:
35 | name: cupertino_icons
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "0.1.2"
39 | flutter:
40 | dependency: "direct main"
41 | description: flutter
42 | source: sdk
43 | version: "0.0.0"
44 | flutter_test:
45 | dependency: "direct dev"
46 | description: flutter
47 | source: sdk
48 | version: "0.0.0"
49 | fluttery_dart2:
50 | dependency: transitive
51 | description:
52 | name: fluttery_dart2
53 | url: "https://pub.dartlang.org"
54 | source: hosted
55 | version: "0.0.9"
56 | matcher:
57 | dependency: transitive
58 | description:
59 | name: matcher
60 | url: "https://pub.dartlang.org"
61 | source: hosted
62 | version: "0.12.5"
63 | meta:
64 | dependency: transitive
65 | description:
66 | name: meta
67 | url: "https://pub.dartlang.org"
68 | source: hosted
69 | version: "1.1.6"
70 | path:
71 | dependency: transitive
72 | description:
73 | name: path
74 | url: "https://pub.dartlang.org"
75 | source: hosted
76 | version: "1.6.2"
77 | pedantic:
78 | dependency: transitive
79 | description:
80 | name: pedantic
81 | url: "https://pub.dartlang.org"
82 | source: hosted
83 | version: "1.7.0"
84 | quiver:
85 | dependency: transitive
86 | description:
87 | name: quiver
88 | url: "https://pub.dartlang.org"
89 | source: hosted
90 | version: "2.0.3"
91 | sky_engine:
92 | dependency: transitive
93 | description: flutter
94 | source: sdk
95 | version: "0.0.99"
96 | source_span:
97 | dependency: transitive
98 | description:
99 | name: source_span
100 | url: "https://pub.dartlang.org"
101 | source: hosted
102 | version: "1.5.5"
103 | stack_trace:
104 | dependency: transitive
105 | description:
106 | name: stack_trace
107 | url: "https://pub.dartlang.org"
108 | source: hosted
109 | version: "1.9.3"
110 | stream_channel:
111 | dependency: transitive
112 | description:
113 | name: stream_channel
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "2.0.0"
117 | string_scanner:
118 | dependency: transitive
119 | description:
120 | name: string_scanner
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "1.0.4"
124 | term_glyph:
125 | dependency: transitive
126 | description:
127 | name: term_glyph
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "1.1.0"
131 | test_api:
132 | dependency: transitive
133 | description:
134 | name: test_api
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "0.2.5"
138 | tinder_card:
139 | dependency: "direct dev"
140 | description:
141 | path: ".."
142 | relative: true
143 | source: path
144 | version: "0.1.1"
145 | typed_data:
146 | dependency: transitive
147 | description:
148 | name: typed_data
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "1.1.6"
152 | vector_math:
153 | dependency: transitive
154 | description:
155 | name: vector_math
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "2.0.8"
159 | sdks:
160 | dart: ">=2.2.2 <3.0.0"
161 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: tinder_card_example
2 | description: Demonstrates how to use the tinder_card plugin.
3 | publish_to: 'none'
4 |
5 | environment:
6 | sdk: ">=2.1.0 <3.0.0"
7 |
8 | dependencies:
9 | flutter:
10 | sdk: flutter
11 |
12 | # The following adds the Cupertino Icons font to your application.
13 | # Use with the CupertinoIcons class for iOS style icons.
14 | cupertino_icons: ^0.1.2
15 |
16 | dev_dependencies:
17 | flutter_test:
18 | sdk: flutter
19 |
20 | tinder_card:
21 | path: ../
22 |
23 | # For information on the generic Dart part of this file, see the
24 | # following page: https://dart.dev/tools/pub/pubspec
25 |
26 | # The following section is specific to Flutter.
27 | flutter:
28 |
29 | # The following line ensures that the Material Icons font is
30 | # included with your application, so that you can use the icons in
31 | # the material Icons class.
32 | uses-material-design: true
33 | assets:
34 | - assets/1.jpg
35 | - assets/2.jpg
36 | - assets/3.jpg
37 | - assets/5.jpg
38 | - assets/6.jpg
39 | - assets/7.jpeg
40 | - assets/8.jpeg
41 | - assets/9.jpeg
42 | - assets/10.jpeg
43 |
44 | # To add assets to your application, add an assets section, like this:
45 | # assets:
46 | # - images/a_dot_burr.jpeg
47 | # - images/a_dot_ham.jpeg
48 |
49 | # An image asset can refer to one or more resolution-specific "variants", see
50 | # https://flutter.dev/assets-and-images/#resolution-aware.
51 |
52 | # For details regarding adding assets from package dependencies, see
53 | # https://flutter.dev/assets-and-images/#from-packages
54 |
55 | # To add custom fonts to your application, add a fonts section here,
56 | # in this "flutter" section. Each entry in this list should have a
57 | # "family" key with the font family name, and a "fonts" key with a
58 | # list giving the asset and other descriptors for the font. For
59 | # example:
60 | # fonts:
61 | # - family: Schyler
62 | # fonts:
63 | # - asset: fonts/Schyler-Regular.ttf
64 | # - asset: fonts/Schyler-Italic.ttf
65 | # style: italic
66 | # - family: Trajan Pro
67 | # fonts:
68 | # - asset: fonts/TrajanPro.ttf
69 | # - asset: fonts/TrajanPro_Bold.ttf
70 | # weight: 700
71 | #
72 | # For details regarding fonts from package dependencies,
73 | # see https://flutter.dev/custom-fonts/#from-packages
74 |
--------------------------------------------------------------------------------
/example/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:tinder_card_example/main.dart';
12 |
13 | void main() {
14 | testWidgets('Verify Platform version', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that platform version is retrieved.
19 | expect(
20 | find.byWidgetPredicate(
21 | (Widget widget) => widget is Text &&
22 | widget.data.startsWith('Running on:'),
23 | ),
24 | findsOneWidget,
25 | );
26 | });
27 | }
28 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .vagrant/
3 | .sconsign.dblite
4 | .svn/
5 |
6 | .DS_Store
7 | *.swp
8 | profile
9 |
10 | DerivedData/
11 | build/
12 | GeneratedPluginRegistrant.h
13 | GeneratedPluginRegistrant.m
14 |
15 | .generated/
16 |
17 | *.pbxuser
18 | *.mode1v3
19 | *.mode2v3
20 | *.perspectivev3
21 |
22 | !default.pbxuser
23 | !default.mode1v3
24 | !default.mode2v3
25 | !default.perspectivev3
26 |
27 | xcuserdata
28 |
29 | *.moved-aside
30 |
31 | *.pyc
32 | *sync/
33 | Icon?
34 | .tags*
35 |
36 | /Flutter/Generated.xcconfig
37 |
--------------------------------------------------------------------------------
/ios/Assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aneeshzed/flutter_tinder_card/33a5de858871ae13b788e986660224389eeb0aa1/ios/Assets/.gitkeep
--------------------------------------------------------------------------------
/ios/Classes/SwiftTinderCardPlugin.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 |
4 | public class SwiftTinderCardPlugin: NSObject, FlutterPlugin {
5 | public static func register(with registrar: FlutterPluginRegistrar) {
6 | let channel = FlutterMethodChannel(name: "tinder_card", binaryMessenger: registrar.messenger())
7 | let instance = SwiftTinderCardPlugin()
8 | registrar.addMethodCallDelegate(instance, channel: channel)
9 | }
10 |
11 | public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
12 | result("iOS " + UIDevice.current.systemVersion)
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/ios/Classes/TinderCardPlugin.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface TinderCardPlugin : NSObject
4 | @end
5 |
--------------------------------------------------------------------------------
/ios/Classes/TinderCardPlugin.m:
--------------------------------------------------------------------------------
1 | #import "TinderCardPlugin.h"
2 | #import
3 |
4 | @implementation TinderCardPlugin
5 | + (void)registerWithRegistrar:(NSObject*)registrar {
6 | [SwiftTinderCardPlugin registerWithRegistrar:registrar];
7 | }
8 | @end
9 |
--------------------------------------------------------------------------------
/ios/tinder_card.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
3 | #
4 | Pod::Spec.new do |s|
5 | s.name = 'tinder_card'
6 | s.version = '0.0.1'
7 | s.summary = 'A sample Tinder Card with swipe effects'
8 | s.description = <<-DESC
9 | A sample Tinder Card with swipe effects
10 | DESC
11 | s.homepage = 'http://example.com'
12 | s.license = { :file => '../LICENSE' }
13 | s.author = { 'Your Company' => 'email@example.com' }
14 | s.source = { :path => '.' }
15 | s.source_files = 'Classes/**/*'
16 | s.public_header_files = 'Classes/**/*.h'
17 | s.dependency 'Flutter'
18 |
19 | s.ios.deployment_target = '8.0'
20 | end
21 |
22 |
--------------------------------------------------------------------------------
/lib/cards.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:fluttery_dart2/layout.dart';
5 |
6 | import './matches.dart';
7 | import './photos.dart';
8 |
9 | class CardStack extends StatefulWidget {
10 | final Function(Decision) onSwipeCallback;
11 |
12 | final MatchEngine matchEngine;
13 |
14 | CardStack({this.matchEngine, this.onSwipeCallback});
15 |
16 | @override
17 | _CardStackState createState() => _CardStackState();
18 | }
19 |
20 | class _CardStackState extends State {
21 | Key _frontCard;
22 | Match _currentMatch;
23 | double _nextCardScale = 0.0;
24 |
25 | @override
26 | void initState() {
27 | super.initState();
28 | widget.matchEngine.addListener(_onMatchEngineChange);
29 |
30 | _currentMatch = widget.matchEngine.currentMatch;
31 | _currentMatch.addListener(_onMatchChange);
32 |
33 | _frontCard = new Key(_currentMatch.profile.name);
34 | }
35 |
36 | @override
37 | void didUpdateWidget(CardStack oldWidget) {
38 | super.didUpdateWidget(oldWidget);
39 |
40 | if (widget.matchEngine != oldWidget.matchEngine) {
41 | oldWidget.matchEngine.removeListener(_onMatchEngineChange);
42 | widget.matchEngine.addListener(_onMatchEngineChange);
43 |
44 | if (_currentMatch != null) {
45 | _currentMatch.removeListener(_onMatchChange);
46 | }
47 |
48 | _currentMatch = widget.matchEngine.currentMatch;
49 | if (_currentMatch != null) {
50 | _currentMatch.addListener(_onMatchChange);
51 | }
52 | }
53 | }
54 |
55 | @override
56 | void dispose() {
57 | if (_currentMatch != null) {
58 | _currentMatch.removeListener(_onMatchChange);
59 | }
60 |
61 | widget.matchEngine.removeListener(_onMatchEngineChange);
62 | super.dispose();
63 | }
64 |
65 | _onMatchEngineChange() {
66 | setState(() {
67 | if (_currentMatch != null) {
68 | _currentMatch.removeListener(_onMatchChange);
69 | }
70 |
71 | _currentMatch = widget.matchEngine.currentMatch;
72 | if (_currentMatch != null) {
73 | _currentMatch.addListener(_onMatchChange);
74 | }
75 |
76 | _frontCard = new Key(_currentMatch.profile.name);
77 | });
78 | }
79 |
80 | _onMatchChange() {
81 | setState(() {});
82 | }
83 |
84 | Widget _buildBackCard() {
85 | return Transform(
86 | transform: Matrix4.identity()..scale(_nextCardScale, _nextCardScale),
87 | alignment: Alignment.center,
88 | child: ProfileCard(
89 | profile: widget.matchEngine.nextMatch.profile,
90 | ),
91 | );
92 | }
93 |
94 | Widget _buildFrontCard() {
95 | return ProfileCard(
96 | key: _frontCard,
97 | profile: widget.matchEngine.currentMatch.profile,
98 | );
99 | }
100 |
101 | SlideDirection _desiredSlideOutDirection() {
102 | switch (widget.matchEngine.currentMatch.decision) {
103 | case Decision.nope:
104 | return SlideDirection.left;
105 | break;
106 | case Decision.like:
107 | return SlideDirection.right;
108 | break;
109 | case Decision.superLike:
110 | return SlideDirection.up;
111 | break;
112 | default:
113 | return null;
114 | }
115 | }
116 |
117 | void _onSlideUpdate(double distance) {
118 | setState(() {
119 | _nextCardScale = 0.9 + (0.1 * (distance / 100.0)).clamp(0.0, 0.1);
120 | });
121 | }
122 |
123 | void _onSlideComplete(SlideDirection direction) {
124 | Match currenMatch = widget.matchEngine.currentMatch;
125 |
126 | switch (direction) {
127 | case SlideDirection.left:
128 | currenMatch.nope();
129 | widget.onSwipeCallback(currenMatch.decision);
130 | break;
131 | case SlideDirection.right:
132 | currenMatch.like();
133 | widget.onSwipeCallback(currenMatch.decision);
134 | break;
135 | case SlideDirection.up:
136 | currenMatch.superLike();
137 | widget.onSwipeCallback(currenMatch.decision);
138 | break;
139 | }
140 |
141 | widget.matchEngine.cycleMatch();
142 | }
143 |
144 | @override
145 | Widget build(BuildContext context) {
146 | return Stack(
147 | children: [
148 | DraggableCard(
149 | screenHeight: MediaQuery.of(context).size.height,
150 | screenWidth: MediaQuery.of(context).size.width,
151 | isDraggable: false,
152 | card: _buildBackCard(),
153 | ),
154 | DraggableCard(
155 | screenHeight: MediaQuery.of(context).size.height,
156 | screenWidth: MediaQuery.of(context).size.width,
157 | card: _buildFrontCard(),
158 | slideTo: _desiredSlideOutDirection(),
159 | onSlideUpdate: _onSlideUpdate,
160 | onSlideComplete: _onSlideComplete,
161 | )
162 | ],
163 | );
164 | }
165 | }
166 |
167 | enum SlideDirection {
168 | left,
169 | right,
170 | up,
171 | }
172 |
173 | class DraggableCard extends StatefulWidget {
174 | final Widget card;
175 | final bool isDraggable;
176 | final SlideDirection slideTo;
177 | final Function(double distance) onSlideUpdate;
178 | final Function(SlideDirection direction) onSlideComplete;
179 | final double screenWidth;
180 | final double screenHeight;
181 |
182 | DraggableCard({
183 | Key key,
184 | this.card,
185 | this.isDraggable = true,
186 | this.slideTo,
187 | this.onSlideUpdate,
188 | this.onSlideComplete,
189 | this.screenWidth,
190 | this.screenHeight,
191 | });
192 |
193 | @override
194 | _DraggableCardState createState() => _DraggableCardState();
195 | }
196 |
197 | class _DraggableCardState extends State
198 | with TickerProviderStateMixin {
199 | Decision decision;
200 | GlobalKey profileCardKey = GlobalKey(debugLabel: 'profile_card_key');
201 | Offset cardOffset = const Offset(0.0, 0.0);
202 | Offset dragStart;
203 | Offset dragPosition;
204 | Offset slideBackStart;
205 | SlideDirection slideOutDirection;
206 | AnimationController slideBackAnimation;
207 | Tween slideOutTween;
208 | AnimationController slideOutAnimation;
209 |
210 | @override
211 | void initState() {
212 | super.initState();
213 | slideBackAnimation = new AnimationController(
214 | vsync: this,
215 | duration: const Duration(milliseconds: 1000),
216 | )
217 | ..addListener(() => setState(() {
218 | cardOffset = Offset.lerp(slideBackStart, const Offset(0.0, 0.0),
219 | Curves.elasticOut.transform(slideBackAnimation.value));
220 |
221 | if (null != widget.onSlideUpdate) {
222 | widget.onSlideUpdate(cardOffset.distance);
223 | }
224 | }))
225 | ..addStatusListener((AnimationStatus status) {
226 | if (status == AnimationStatus.completed) {
227 | setState(() {
228 | dragStart = null;
229 | slideBackStart = null;
230 | dragPosition = null;
231 | });
232 | }
233 | });
234 |
235 | slideOutAnimation = new AnimationController(
236 | vsync: this,
237 | duration: const Duration(milliseconds: 500),
238 | )
239 | ..addListener(() => setState(() {
240 | cardOffset = slideOutTween.evaluate(slideOutAnimation);
241 |
242 | if (null != widget.onSlideUpdate) {
243 | widget.onSlideUpdate(cardOffset.distance);
244 | }
245 | }))
246 | ..addStatusListener((AnimationStatus status) {
247 | if (status == AnimationStatus.completed) {
248 | setState(() {
249 | dragStart = null;
250 | dragPosition = null;
251 | slideOutTween = null;
252 |
253 | if (widget.onSlideComplete != null) {
254 | widget.onSlideComplete(slideOutDirection);
255 | }
256 | });
257 | }
258 | });
259 | }
260 |
261 | @override
262 | void didUpdateWidget(DraggableCard oldWidget) {
263 | super.didUpdateWidget(oldWidget);
264 |
265 | if (widget.card.key != oldWidget.card.key) {
266 | cardOffset = const Offset(0.0, 0.0);
267 | }
268 |
269 | if (oldWidget.slideTo == null) {
270 | switch (widget.slideTo) {
271 | case SlideDirection.left:
272 | _slideLeft();
273 | break;
274 | case SlideDirection.right:
275 | _slideRight();
276 | break;
277 | case SlideDirection.up:
278 | _slideUp();
279 | break;
280 | }
281 | }
282 | }
283 |
284 | @override
285 | void dispose() {
286 | slideBackAnimation.dispose();
287 | slideOutAnimation.dispose();
288 | super.dispose();
289 | }
290 |
291 | void _slideLeft() {
292 | // final screenWidth = context.size.width;
293 | dragStart = _chooseRandomDragStart();
294 | slideOutTween = Tween(
295 | begin: const Offset(0.0, 0.0),
296 | end: Offset(-2 * widget.screenWidth, 0.0),
297 | );
298 |
299 | slideOutAnimation.forward(from: 0.0);
300 | }
301 |
302 | Offset _chooseRandomDragStart() {
303 | final cardContex = profileCardKey.currentContext;
304 | final cardTopLeft = (cardContex.findRenderObject() as RenderBox)
305 | .localToGlobal(const Offset(0.0, 0.0));
306 | final dragStartY =
307 | widget.screenHeight * (new Random().nextDouble() < 0.5 ? 0.25 : 0.75) +
308 | cardTopLeft.dy;
309 |
310 | return Offset(widget.screenWidth / 2 + cardTopLeft.dx, dragStartY);
311 | }
312 |
313 | void _slideRight() {
314 | dragStart = _chooseRandomDragStart();
315 | slideOutTween = Tween(
316 | begin: const Offset(0.0, 0.0),
317 | end: Offset(2 * widget.screenWidth, 0.0),
318 | );
319 |
320 | slideOutAnimation.forward(from: 0.0);
321 | }
322 |
323 | void _slideUp() {
324 | // final screenHeight = context.size.height;
325 | dragStart = _chooseRandomDragStart();
326 | slideOutTween = Tween(
327 | begin: const Offset(0.0, 0.0),
328 | end: Offset(0.0, -2 * widget.screenHeight),
329 | );
330 |
331 | slideOutAnimation.forward(from: 0.0);
332 | }
333 |
334 | void _onPanStart(DragStartDetails details) {
335 | dragStart = details.globalPosition;
336 |
337 | if (slideBackAnimation.isAnimating) {
338 | slideBackAnimation.stop(canceled: true);
339 | }
340 | }
341 |
342 | void _onPanUpdate(DragUpdateDetails details) {
343 | setState(() {
344 | dragPosition = details.globalPosition;
345 | cardOffset = dragPosition - dragStart;
346 |
347 | if (null != widget.onSlideUpdate) {
348 | widget.onSlideUpdate(cardOffset.distance);
349 | }
350 | });
351 | }
352 |
353 | void _onPanEnd(DragEndDetails details) {
354 | final dragVector = cardOffset / cardOffset.distance;
355 | final isInLeftRegion = (cardOffset.dx / context.size.width) < -0.45;
356 | final isInRightRegion = (cardOffset.dx / context.size.width) > 0.45;
357 | final isInTopRegion = (cardOffset.dy / context.size.height) < -0.40;
358 |
359 | setState(() {
360 | if (isInLeftRegion || isInRightRegion) {
361 | slideOutTween = new Tween(
362 | begin: cardOffset, end: dragVector * (2 * context.size.width));
363 |
364 | slideOutAnimation.forward(from: 0.0);
365 |
366 | slideOutDirection =
367 | isInLeftRegion ? SlideDirection.left : SlideDirection.right;
368 | } else if (isInTopRegion) {
369 | slideOutTween = new Tween(
370 | begin: cardOffset, end: dragVector * (2 * context.size.height));
371 | slideOutAnimation.forward(from: 0.0);
372 |
373 | slideOutDirection = SlideDirection.up;
374 | } else {
375 | slideBackStart = cardOffset;
376 | slideBackAnimation.forward(from: 0.0);
377 | }
378 | });
379 | }
380 |
381 | double _rotation(Rect dragBounds) {
382 | if (dragStart != null) {
383 | final rotationCornerMultiplier =
384 | dragStart.dy >= dragBounds.top + (dragBounds.height / 2) ? -1 : 1;
385 | return (pi / 8) *
386 | (cardOffset.dx / dragBounds.width) *
387 | rotationCornerMultiplier;
388 | } else {
389 | return 0.0;
390 | }
391 | }
392 |
393 | Offset _rotationOrigin(Rect dragBounds) {
394 | if (dragStart != null) {
395 | return dragStart - dragBounds.topLeft;
396 | } else {
397 | return const Offset(0.0, 0.0);
398 | }
399 | }
400 |
401 | @override
402 | Widget build(BuildContext context) {
403 | return new AnchoredOverlay(
404 | showOverlay: true,
405 | child: new Center(),
406 | overlayBuilder: (BuildContext context, Rect anchorBounds, Offset anchor) {
407 | return CenterAbout(
408 | position: anchor,
409 | child: new Transform(
410 | transform:
411 | new Matrix4.translationValues(cardOffset.dx, cardOffset.dy, 0.0)
412 | ..rotateZ(_rotation(anchorBounds)),
413 | origin: _rotationOrigin(anchorBounds),
414 | child: new Container(
415 | key: profileCardKey,
416 | width: anchorBounds.width,
417 | height: anchorBounds.height,
418 | padding: const EdgeInsets.all(16.0),
419 | child: new GestureDetector(
420 | onPanStart: _onPanStart,
421 | onPanUpdate: _onPanUpdate,
422 | onPanEnd: _onPanEnd,
423 | child: widget.card,
424 | ),
425 | ),
426 | ),
427 | );
428 | },
429 | );
430 | }
431 | }
432 |
433 | class ProfileCard extends StatefulWidget {
434 | final profile;
435 |
436 | ProfileCard({Key key, this.profile}) : super(key: key);
437 |
438 | @override
439 | _ProfileCardState createState() => _ProfileCardState();
440 | }
441 |
442 | class _ProfileCardState extends State {
443 | Widget _buildBackground() {
444 | return new PhotoBrowser(
445 | photoAssetPaths: widget.profile.photos,
446 | visiblePhotoIndex: 0,
447 | );
448 | }
449 |
450 | Widget _buildProfileSynopsis() {
451 | return new Positioned(
452 | left: 0.0,
453 | right: 0.0,
454 | bottom: 0.0,
455 | child: new Container(
456 | decoration: new BoxDecoration(
457 | gradient: LinearGradient(
458 | begin: Alignment.topCenter,
459 | end: Alignment.bottomCenter,
460 | colors: [
461 | Colors.transparent,
462 | Colors.black.withOpacity(0.8),
463 | ])),
464 | padding: const EdgeInsets.all(24.0),
465 | child: new Row(
466 | mainAxisSize: MainAxisSize.max,
467 | children: [
468 | new Expanded(
469 | child: new Column(
470 | crossAxisAlignment: CrossAxisAlignment.start,
471 | mainAxisSize: MainAxisSize.min,
472 | children: [
473 | new Text(widget.profile.name,
474 | style:
475 | new TextStyle(color: Colors.white, fontSize: 24.0)),
476 | new Text(widget.profile.bio,
477 | style: new TextStyle(color: Colors.white, fontSize: 18.0))
478 | ],
479 | ),
480 | ),
481 | new Icon(
482 | Icons.info,
483 | color: Colors.white,
484 | )
485 | ],
486 | ),
487 | ),
488 | );
489 | }
490 |
491 | @override
492 | Widget build(BuildContext context) {
493 | return Container(
494 | decoration: new BoxDecoration(
495 | borderRadius: new BorderRadius.circular(10.0),
496 | boxShadow: [
497 | new BoxShadow(
498 | color: const Color(0x11000000),
499 | blurRadius: 5.0,
500 | spreadRadius: 2.0,
501 | )
502 | ]),
503 | child: ClipRRect(
504 | borderRadius: new BorderRadius.circular(10.0),
505 | child: new Material(
506 | child: new Stack(
507 | fit: StackFit.expand,
508 | children: [
509 | _buildBackground(),
510 | _buildProfileSynopsis(),
511 | ],
512 | ),
513 | ),
514 | ),
515 | );
516 | }
517 | }
518 |
--------------------------------------------------------------------------------
/lib/matches.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/widgets.dart';
2 |
3 | class MatchEngine extends ChangeNotifier {
4 | final List _matches;
5 | int _currrentMatchIndex;
6 | int _nextMatchIndex;
7 |
8 | MatchEngine({
9 | List matches,
10 | }) : _matches = matches {
11 | _currrentMatchIndex = 0;
12 | _nextMatchIndex = 1;
13 | }
14 |
15 | Match get currentMatch => _matches[_currrentMatchIndex];
16 | Match get nextMatch => _matches[_nextMatchIndex];
17 |
18 | void cycleMatch() {
19 | if (currentMatch.decision != Decision.indecided) {
20 | currentMatch.reset();
21 | _currrentMatchIndex = _nextMatchIndex;
22 | _nextMatchIndex =
23 | _nextMatchIndex < _matches.length - 1 ? _nextMatchIndex + 1 : 0;
24 | notifyListeners();
25 | }
26 | }
27 | }
28 |
29 | class Match extends ChangeNotifier {
30 | final profile;
31 | var decision = Decision.indecided;
32 |
33 | Match({this.profile, this.decision});
34 |
35 | void like() {
36 | // if (decision == Decision.indecided) {
37 | decision = Decision.like;
38 | notifyListeners();
39 | // }
40 | }
41 |
42 | void nope() {
43 | // if (decision == Decision.indecided) {
44 | decision = Decision.nope;
45 | notifyListeners();
46 | // }
47 | }
48 |
49 | void superLike() {
50 | // if (decision == Decision.indecided) {
51 | decision = Decision.superLike;
52 | notifyListeners();
53 | // }
54 | }
55 |
56 | void reset() {
57 | // if (decision != Decision.indecided) {
58 | decision = Decision.indecided;
59 | notifyListeners();
60 | // }
61 | }
62 | }
63 |
64 | enum Decision {
65 | indecided,
66 | nope,
67 | like,
68 | superLike,
69 | }
70 |
--------------------------------------------------------------------------------
/lib/photos.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class PhotoBrowser extends StatefulWidget {
4 | final List photoAssetPaths;
5 | final int visiblePhotoIndex;
6 |
7 | PhotoBrowser({this.photoAssetPaths, this.visiblePhotoIndex});
8 |
9 | @override
10 | _PhotoBrowserState createState() => _PhotoBrowserState();
11 | }
12 |
13 | class _PhotoBrowserState extends State {
14 | int visiblePhotoIndex;
15 |
16 | @override
17 | void initState() {
18 | super.initState();
19 | visiblePhotoIndex = widget.visiblePhotoIndex;
20 | }
21 |
22 | @override
23 | void didUpdateWidget(PhotoBrowser oldWidget) {
24 | super.didUpdateWidget(oldWidget);
25 | if (widget.visiblePhotoIndex != oldWidget.visiblePhotoIndex) {
26 | setState(() {
27 | visiblePhotoIndex = widget.visiblePhotoIndex;
28 | });
29 | }
30 | }
31 |
32 | void _prevImage() {
33 | setState(() {
34 | visiblePhotoIndex = visiblePhotoIndex > 0 ? visiblePhotoIndex - 1 : 0;
35 | });
36 | }
37 |
38 | void _nextImage() {
39 | setState(() {
40 | visiblePhotoIndex = visiblePhotoIndex < widget.photoAssetPaths.length - 1
41 | ? visiblePhotoIndex + 1
42 | : visiblePhotoIndex;
43 | });
44 | }
45 |
46 | Widget _buildPhotoControls() {
47 | return new Stack(
48 | fit: StackFit.expand,
49 | children: [
50 | new GestureDetector(
51 | onTap: _prevImage,
52 | child: new FractionallySizedBox(
53 | widthFactor: 0.5,
54 | heightFactor: 1.0,
55 | alignment: Alignment.topLeft,
56 | child: new Container(
57 | color: Colors.transparent,
58 | ),
59 | ),
60 | ),
61 | new GestureDetector(
62 | onTap: _nextImage,
63 | child: new FractionallySizedBox(
64 | widthFactor: 0.5,
65 | heightFactor: 1.0,
66 | alignment: Alignment.topRight,
67 | child: new Container(
68 | color: Colors.transparent,
69 | ),
70 | ),
71 | ),
72 | ],
73 | );
74 | }
75 |
76 | @override
77 | Widget build(BuildContext context) {
78 | return Stack(
79 | fit: StackFit.expand,
80 | children: [
81 | // Photo
82 | new Image.asset(
83 | widget.photoAssetPaths[visiblePhotoIndex],
84 | fit: BoxFit.cover,
85 | ),
86 | // Photo indicator
87 | new Positioned(
88 | top: 0.0,
89 | left: 0.0,
90 | right: 0.0,
91 | child: new SelectedPhotoIndicator(
92 | photoCount: widget.photoAssetPaths.length,
93 | visiblePhotoIndex: visiblePhotoIndex,
94 | ),
95 | ),
96 | // Photo control
97 | _buildPhotoControls(),
98 | ],
99 | );
100 | }
101 | }
102 |
103 | class SelectedPhotoIndicator extends StatelessWidget {
104 | final int photoCount;
105 | final int visiblePhotoIndex;
106 |
107 | SelectedPhotoIndicator({this.visiblePhotoIndex, this.photoCount});
108 |
109 | Widget _buildInactiveIndicator() {
110 | return new Expanded(
111 | child: new Padding(
112 | padding: const EdgeInsets.only(left: 2.0, right: 2.0),
113 | child: new Container(
114 | height: 3.0,
115 | decoration: new BoxDecoration(
116 | color: Colors.black.withOpacity(0.2),
117 | borderRadius: new BorderRadius.circular(2.5)),
118 | ),
119 | ),
120 | );
121 | }
122 |
123 | Widget _buildActiveIndicator() {
124 | return new Expanded(
125 | child: new Padding(
126 | padding: const EdgeInsets.only(left: 2.0, right: 2.0),
127 | child: new Container(
128 | height: 3.0,
129 | decoration: new BoxDecoration(
130 | color: Colors.white,
131 | borderRadius: new BorderRadius.circular(2.5),
132 | boxShadow: [
133 | new BoxShadow(
134 | color: const Color(0x22000000),
135 | blurRadius: 2.0,
136 | spreadRadius: 0.0,
137 | offset: const Offset(0.0, 1.0))
138 | ]),
139 | ),
140 | ),
141 | );
142 | }
143 |
144 | List _buildIndicators() {
145 | List indicators = [];
146 | for (int i = 0; i < photoCount; i++) {
147 | indicators.add(i == visiblePhotoIndex
148 | ? _buildActiveIndicator()
149 | : _buildInactiveIndicator());
150 | }
151 | return indicators;
152 | }
153 |
154 | @override
155 | Widget build(BuildContext context) {
156 | return new Padding(
157 | padding: const EdgeInsets.all(0.0),
158 | child: new Row(
159 | children: _buildIndicators(),
160 | ),
161 | );
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/lib/tinder_card.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import './cards.dart';
4 | import './matches.dart';
5 |
6 | class TinderSwapCard extends StatefulWidget {
7 | TinderSwapCard({
8 | Key key,
9 | this.title,
10 | this.demoProfiles,
11 | this.myCallback,
12 | }) : super(key: key);
13 |
14 | final String title;
15 | final List demoProfiles;
16 |
17 | final Function(Decision) myCallback;
18 |
19 | @override
20 | _TinderSwapCardState createState() => _TinderSwapCardState();
21 | }
22 |
23 | class _TinderSwapCardState extends State {
24 | Match match = new Match();
25 |
26 | Widget _buildBottomBar(MatchEngine matchEngine) {
27 | return BottomAppBar(
28 | color: Colors.transparent,
29 | elevation: 0.0,
30 | child: new Padding(
31 | padding: const EdgeInsets.all(16.0),
32 | child: new Row(
33 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
34 | children: [
35 | new RoundIconButton.small(
36 | icon: Icons.refresh,
37 | iconColor: Colors.orange,
38 | onPressed: () {},
39 | ),
40 | new RoundIconButton.large(
41 | icon: Icons.clear,
42 | iconColor: Colors.red,
43 | onPressed: () {
44 | matchEngine.currentMatch.nope();
45 | matchEngine.cycleMatch();
46 | },
47 | ),
48 | new RoundIconButton.small(
49 | icon: Icons.star,
50 | iconColor: Colors.blue,
51 | onPressed: () {
52 | matchEngine.currentMatch.superLike();
53 | matchEngine.cycleMatch();
54 | },
55 | ),
56 | new RoundIconButton.large(
57 | icon: Icons.favorite,
58 | iconColor: Colors.green,
59 | onPressed: () {
60 | matchEngine.currentMatch.like();
61 | matchEngine.cycleMatch();
62 | },
63 | ),
64 | new RoundIconButton.small(
65 | icon: Icons.lock,
66 | iconColor: Colors.purple,
67 | onPressed: () {},
68 | ),
69 | ],
70 | ),
71 | ));
72 | }
73 |
74 | @override
75 | Widget build(BuildContext context) {
76 | final MatchEngine matchEngine = new MatchEngine(
77 | matches: widget.demoProfiles.map((final profile) {
78 | return Match(profile: profile);
79 | }).toList());
80 |
81 | return Scaffold(
82 | body: Padding(
83 | padding: const EdgeInsets.only(top: 20.0),
84 | child: new CardStack(
85 | matchEngine: matchEngine,
86 | onSwipeCallback: (match) {
87 | widget.myCallback(match);
88 | }),
89 | ),
90 | bottomNavigationBar: _buildBottomBar(matchEngine),
91 | );
92 | }
93 | }
94 |
95 | class RoundIconButton extends StatelessWidget {
96 | final IconData icon;
97 | final Color iconColor;
98 | final double size;
99 | final VoidCallback onPressed;
100 |
101 | RoundIconButton.large({
102 | this.icon,
103 | this.iconColor,
104 | this.onPressed,
105 | }) : size = 60.0;
106 |
107 | RoundIconButton.small({
108 | this.icon,
109 | this.iconColor,
110 | this.onPressed,
111 | }) : size = 50.0;
112 |
113 | RoundIconButton({
114 | this.icon,
115 | this.iconColor,
116 | this.size,
117 | this.onPressed,
118 | });
119 |
120 | @override
121 | Widget build(BuildContext context) {
122 | return Container(
123 | width: size,
124 | height: size,
125 | decoration: new BoxDecoration(
126 | shape: BoxShape.circle,
127 | color: Colors.white,
128 | boxShadow: [
129 | new BoxShadow(color: const Color(0x11000000), blurRadius: 10.0),
130 | ]),
131 | child: new RawMaterialButton(
132 | shape: new CircleBorder(),
133 | elevation: 0.0,
134 | child: new Icon(
135 | icon,
136 | color: iconColor,
137 | ),
138 | onPressed: onPressed,
139 | ),
140 | );
141 | }
142 | }
143 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.2.0"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "1.0.4"
18 | charcode:
19 | dependency: transitive
20 | description:
21 | name: charcode
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.2"
25 | collection:
26 | dependency: transitive
27 | description:
28 | name: collection
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.14.11"
32 | flutter:
33 | dependency: "direct main"
34 | description: flutter
35 | source: sdk
36 | version: "0.0.0"
37 | flutter_test:
38 | dependency: "direct dev"
39 | description: flutter
40 | source: sdk
41 | version: "0.0.0"
42 | fluttery_dart2:
43 | dependency: "direct main"
44 | description:
45 | name: fluttery_dart2
46 | url: "https://pub.dartlang.org"
47 | source: hosted
48 | version: "0.0.9"
49 | matcher:
50 | dependency: transitive
51 | description:
52 | name: matcher
53 | url: "https://pub.dartlang.org"
54 | source: hosted
55 | version: "0.12.5"
56 | meta:
57 | dependency: transitive
58 | description:
59 | name: meta
60 | url: "https://pub.dartlang.org"
61 | source: hosted
62 | version: "1.1.6"
63 | path:
64 | dependency: transitive
65 | description:
66 | name: path
67 | url: "https://pub.dartlang.org"
68 | source: hosted
69 | version: "1.6.2"
70 | pedantic:
71 | dependency: transitive
72 | description:
73 | name: pedantic
74 | url: "https://pub.dartlang.org"
75 | source: hosted
76 | version: "1.7.0"
77 | quiver:
78 | dependency: transitive
79 | description:
80 | name: quiver
81 | url: "https://pub.dartlang.org"
82 | source: hosted
83 | version: "2.0.3"
84 | sky_engine:
85 | dependency: transitive
86 | description: flutter
87 | source: sdk
88 | version: "0.0.99"
89 | source_span:
90 | dependency: transitive
91 | description:
92 | name: source_span
93 | url: "https://pub.dartlang.org"
94 | source: hosted
95 | version: "1.5.5"
96 | stack_trace:
97 | dependency: transitive
98 | description:
99 | name: stack_trace
100 | url: "https://pub.dartlang.org"
101 | source: hosted
102 | version: "1.9.3"
103 | stream_channel:
104 | dependency: transitive
105 | description:
106 | name: stream_channel
107 | url: "https://pub.dartlang.org"
108 | source: hosted
109 | version: "2.0.0"
110 | string_scanner:
111 | dependency: transitive
112 | description:
113 | name: string_scanner
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "1.0.4"
117 | term_glyph:
118 | dependency: transitive
119 | description:
120 | name: term_glyph
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "1.1.0"
124 | test_api:
125 | dependency: transitive
126 | description:
127 | name: test_api
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "0.2.5"
131 | typed_data:
132 | dependency: transitive
133 | description:
134 | name: typed_data
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "1.1.6"
138 | vector_math:
139 | dependency: transitive
140 | description:
141 | name: vector_math
142 | url: "https://pub.dartlang.org"
143 | source: hosted
144 | version: "2.0.8"
145 | sdks:
146 | dart: ">=2.2.2 <3.0.0"
147 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: tinder_card
2 | description: A sample Tinder Card with swipe effects (right, left, up) and multiple images showing into the card and tap to view the next image.
3 | version: 0.1.1
4 | author: Aneesh G
5 | homepage: https://github.com/Aneesh1990/flutter_tinder_card.git
6 |
7 | environment:
8 | sdk: ">=2.1.0 <3.0.0"
9 |
10 | dependencies:
11 | flutter:
12 | sdk: flutter
13 |
14 | fluttery_dart2: ^0.0.9
15 |
16 | dev_dependencies:
17 | flutter_test:
18 | sdk: flutter
19 |
20 | # For information on the generic Dart part of this file, see the
21 | # following page: https://dart.dev/tools/pub/pubspec
22 |
23 | # The following section is specific to Flutter.
24 | flutter:
25 | # This section identifies this Flutter project as a plugin project.
26 | # The androidPackage and pluginClass identifiers should not ordinarily
27 | # be modified. They are used by the tooling to maintain consistency when
28 | # adding or updating assets for this project.
29 | plugin:
30 | androidPackage: com.ileaf.tinder_card
31 | pluginClass: TinderCardPlugin
32 |
33 | # To add assets to your plugin package, add an assets section, like this:
34 | # assets:
35 | # - images/a_dot_burr.jpeg
36 | # - images/a_dot_ham.jpeg
37 | #
38 | # For details regarding assets in packages, see
39 | # https://flutter.dev/assets-and-images/#from-packages
40 | #
41 | # An image asset can refer to one or more resolution-specific "variants", see
42 | # https://flutter.dev/assets-and-images/#resolution-aware.
43 |
44 | # To add custom fonts to your plugin package, add a fonts section here,
45 | # in this "flutter" section. Each entry in this list should have a
46 | # "family" key with the font family name, and a "fonts" key with a
47 | # list giving the asset and other descriptors for the font. For
48 | # example:
49 | # fonts:
50 | # - family: Schyler
51 | # fonts:
52 | # - asset: fonts/Schyler-Regular.ttf
53 | # - asset: fonts/Schyler-Italic.ttf
54 | # style: italic
55 | # - family: Trajan Pro
56 | # fonts:
57 | # - asset: fonts/TrajanPro.ttf
58 | # - asset: fonts/TrajanPro_Bold.ttf
59 | # weight: 700
60 | #
61 | # For details regarding fonts in packages, see
62 | # https://flutter.dev/custom-fonts/#from-packages
63 |
--------------------------------------------------------------------------------
/test/tinder_card_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/services.dart';
2 | import 'package:flutter_test/flutter_test.dart';
3 |
4 | void main() {
5 | const MethodChannel channel = MethodChannel('tinder_card');
6 |
7 | setUp(() {
8 | channel.setMockMethodCallHandler((MethodCall methodCall) async {
9 | return '42';
10 | });
11 | });
12 |
13 | tearDown(() {
14 | channel.setMockMethodCallHandler(null);
15 | });
16 |
17 | test('getPlatformVersion', () async {
18 | // expect(await TinderCard.platformVersion, '42');
19 | });
20 | }
21 |
--------------------------------------------------------------------------------
/tinder_card.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------