Instagram-Clone

Instagram 克隆(包括前端和后端),使用 Flutter 和 Firebase 构建。

笔记

此存储库仍在开发中,我将继续为其添加更多功能。

功能

  • 根据您关注的人定制照片信息流
  • 通过相机或图库发布照片帖
    • 点赞帖子
      • 查看帖子的所有点赞
    • 评论帖子
      • 查看帖子的所有评论
  • 搜索用户
    • 搜索屏幕显示您自己以外的所有图片
    • 根据用户名搜索
  • 个人资料屏
    • 关注/取消关注用户
    • 将图片视图从网格布局更改为流式布局
    • 编辑个人资料
  • 聊天屏幕
    • 与任何用户聊天
    • 聊天时分享图片

屏幕截图

feed example upload photo example go to a profile from feed edit profile example comment and activity feed example comment and activity feed example comment and activity feed example comment and activity feed example comment and activity feed example comment and activity feed example

入门

1. 设置Flutter

2. 克隆仓库

$ git clone https://github.com/mohak1283/Instagram-Clone
$ cd Instagram-Clone/

3. 设置 Firebase 应用

  1. 您需要创建一个 Firebase 实例。请按照 https://console.firebase.google.com 上的说明进行操作。
  2. 创建Firebase实例后,您需要启用匿名身份验证。
  • 转到新实例的 Firebase 控制台。
  • 在左侧菜单中点击“身份验证”。
  • 点击“登录方法”选项卡。
  • 点击“Google”并启用它。
  1. 启用 Firebase 数据库。
  • 转到 Firebase 控制台。
  • 在左侧菜单中点击“数据库”。
  • 点击 Cloudstore 的“创建数据库”按钮
  • 选择“以测试模式开始”并“启用”。
  1. (如果不在 Android 上运行,则跳过)
  • 在您的 Firebase 实例中为 Android 创建一个应用,包名为 com.mohak.instagram
  • 运行以下命令获取您的 SHA-1 密钥。
keytool -exportcert -list -v \
-alias androiddebugkey -keystore ~/.android/debug.keystore
  • 在 Firebase 控制台中,在您的 Android 应用的设置中,通过点击“添加指纹”来添加您的 SHA-1 密钥。
  • 按照说明下载 google-services.json。
  • google-services.json 放入 /android/app/
  1. (如果不在 iOS 上运行,则跳过)
  • 在 Firebase 实例中为 iOS 创建一个应用,使用您的应用包名。
  • 按照说明下载 GoogleService-Info.plist。
  • 在 Xcode 中打开,右键单击 Runner 文件夹,选择“将文件添加到‘Runner’”菜单,然后选择 GoogleService-Info.plist 文件,将其添加到 Xcode 中的 /ios/Runner。
  • 在文本编辑器中打开 /ios/Runner/Info.plist。找到 CFBundleURLSchemes 键。此键的值数组中的第二个项目特定于 Firebase 实例。将其替换为 GoogleService-Info.plist 中 REVERSED_CLIENT_ID 的值。

仔细检查两者的安装说明

  • Google Auth 插件
    • https://pub.dartlang.org/packages/firebase_auth
  • Firestore 插件
    • https://pub.dartlang.org/packages/cloud_firestore

即将推出的功能

  • 点赞、评论、关注等的通知
  • 缓存个人资料、图片等
  • 图片滤镜支持
  • 视频支持
  • 自定义相机实现
  • 点赞图片时的爱心动画
  • 删除帖子
  • 动态
  • 将帖子发送到聊天

GitHub

https://github.com/mohak1283/Instagram-Clone